{
  "components": {
    "schemas": {
      "AccessLevel": {
        "description": "The access level a given user (or company) has to a product or company.",
        "enum": [
          "no_access",
          "admin",
          "customer"
        ],
        "type": "string"
      },
      "AccessPassOrder": {
        "description": "The ways a relation of AccessPasses can be ordered",
        "enum": [
          "active_memberships_count",
          "created_at",
          "usd_gmv",
          "usd_gmv_30_days"
        ],
        "type": "string"
      },
      "AccessPassTypes": {
        "description": "The different types an product can be. Only use 'regular'. The rest are for internal use",
        "enum": [
          "regular",
          "app",
          "experience_upsell",
          "api_only"
        ],
        "type": "string"
      },
      "AccessToken": {
        "description": "A short-lived access token used to authenticate API requests on behalf of a user.",
        "properties": {
          "expires_at": {
            "description": "The timestamp after which this access token is no longer valid and must be refreshed.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "token": {
            "description": "The signed JWT access token string to include in API request Authorization headers.",
            "type": "string"
          }
        },
        "required": [
          "token",
          "expires_at"
        ],
        "type": "object"
      },
      "AccountLink": {
        "description": "A temporary, time-limited URL that grants a user access to an external account management page.",
        "properties": {
          "expires_at": {
            "description": "The timestamp after which this account link URL is no longer valid.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "The temporary URL to redirect the user to for account access. Expires at the time specified by expires_at.",
            "example": "https://whop.com/verify-identity/biz_xxxxxxxxx/",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "type": "object"
      },
      "AccountLinkUseCases": {
        "description": "The different use cases for generating an account link.",
        "enum": [
          "account_onboarding",
          "payouts_portal"
        ],
        "type": "string"
      },
      "Affiliate": {
        "description": "An affiliate tracks a user's referral performance and commission earnings for a company, including retention rates, revenue metrics, and payout configurations.",
        "properties": {
          "active_members_count": {
            "description": "The total active members of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "company": {
            "description": "The company attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the affiliate was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_retention_rate": {
            "description": "The percentage of referred customers who are still active members",
            "type": "string"
          },
          "customer_retention_rate_ninety_days": {
            "description": "The percentage of referred customers who remained active over the last 90 days",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the affiliate.",
            "example": "aff_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "monthly_recurring_revenue_usd": {
            "description": "The monthly recurring revenue generated by this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "status": {
            "description": "The status of the affiliate",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Status"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_overrides_count": {
            "description": "The total count of all overrides for this affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_referral_earnings_usd": {
            "description": "The total commission earnings paid to this affiliate, formatted as a USD currency string",
            "type": "string"
          },
          "total_referrals_count": {
            "description": "The total referrals of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_revenue_usd": {
            "description": "The total revenue generated from this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the affiliate was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name set on the user's Whop profile. Null if the user has not set a name.",
                "example": "Jane Smith",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The unique username chosen by the user for their Whop profile. Null if the user has not set a username.",
                "example": "janesmith",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "total_referrals_count",
          "total_referral_earnings_usd",
          "total_overrides_count",
          "customer_retention_rate",
          "customer_retention_rate_ninety_days",
          "monthly_recurring_revenue_usd",
          "total_revenue_usd",
          "active_members_count",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AffiliateAppliesToPayments": {
        "description": "Whether the affiliate commission applies to the first payment or all payments",
        "enum": [
          "first_payment",
          "all_payments"
        ],
        "type": "string"
      },
      "AffiliateAppliesToProducts": {
        "description": "Whether a rev-share override applies to a single product or all products",
        "enum": [
          "single_product",
          "all_products"
        ],
        "type": "string"
      },
      "AffiliateListItem": {
        "description": "An affiliate tracks a user's referral performance and commission earnings for a company, including retention rates, revenue metrics, and payout configurations.",
        "properties": {
          "active_members_count": {
            "description": "The total active members of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "company": {
            "description": "The company attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the affiliate was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_retention_rate": {
            "description": "The percentage of referred customers who are still active members",
            "type": "string"
          },
          "customer_retention_rate_ninety_days": {
            "description": "The percentage of referred customers who remained active over the last 90 days",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the affiliate.",
            "example": "aff_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "monthly_recurring_revenue_usd": {
            "description": "The monthly recurring revenue generated by this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "status": {
            "description": "The status of the affiliate",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Status"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_overrides_count": {
            "description": "The total count of all overrides for this affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_referral_earnings_usd": {
            "description": "The total commission earnings paid to this affiliate, formatted as a USD currency string",
            "type": "string"
          },
          "total_referrals_count": {
            "description": "The total referrals of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_revenue_usd": {
            "description": "The total revenue generated from this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the affiliate was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name set on the user's Whop profile. Null if the user has not set a name.",
                "example": "Jane Smith",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The unique username chosen by the user for their Whop profile. Null if the user has not set a username.",
                "example": "janesmith",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "total_referrals_count",
          "total_referral_earnings_usd",
          "total_overrides_count",
          "customer_retention_rate",
          "customer_retention_rate_ninety_days",
          "monthly_recurring_revenue_usd",
          "total_revenue_usd",
          "active_members_count",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AffiliateOverrideRoles": {
        "description": "The role of an affiliate override (standard or rev_share)",
        "enum": [
          "standard",
          "rev_share"
        ],
        "type": "string"
      },
      "AffiliatePayoutTypes": {
        "description": "The types of payouts an affiliate can have",
        "enum": [
          "percentage",
          "flat_fee"
        ],
        "type": "string"
      },
      "AffiliateRevenueBases": {
        "description": "The calculation method for affiliate rev-share percentages",
        "enum": [
          "pre_fees",
          "post_fees"
        ],
        "type": "string"
      },
      "AffiliatesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "cached_total_referrals",
          "cached_total_rewards"
        ],
        "type": "string"
      },
      "AiChat": {
        "description": "An AI-powered chat conversation belonging to a user, with optional scheduled automation.",
        "properties": {
          "agent_identifier": {
            "$ref": "#/components/schemas/AiChatAgentIdentifiers",
            "description": "The AI agent that handles this chat. Set when the chat is created and fixed for its lifetime."
          },
          "blended_token_usage": {
            "description": "The total number of tokens consumed across all messages in this conversation.",
            "example": "123.45",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the ai chat was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the ai chat.",
            "example": "aich_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "message_count": {
            "description": "The total number of messages exchanged in this conversation.",
            "example": 42,
            "type": "integer"
          },
          "notification_preference": {
            "$ref": "#/components/schemas/AiChatNotificationPreferences",
            "description": "The notification preference for this AI chat. `all` delivers AI chat notifications and badges, while `none` mutes them."
          },
          "title": {
            "description": "A short descriptive title for this AI chat conversation. Null if no title has been set.",
            "example": "Weekly Revenue Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the ai chat was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this AI chat conversation.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "agent_identifier",
          "notification_preference",
          "message_count",
          "blended_token_usage",
          "created_at",
          "updated_at",
          "last_message_at",
          "user"
        ],
        "type": "object"
      },
      "AiChatAgentIdentifiers": {
        "description": "The AI agent that handles an AI chat.",
        "enum": [
          "general",
          "support"
        ],
        "type": "string"
      },
      "AiChatListItem": {
        "description": "An AI-powered chat conversation belonging to a user, with optional scheduled automation.",
        "properties": {
          "agent_identifier": {
            "$ref": "#/components/schemas/AiChatAgentIdentifiers",
            "description": "The AI agent that handles this chat. Set when the chat is created and fixed for its lifetime."
          },
          "blended_token_usage": {
            "description": "The total number of tokens consumed across all messages in this conversation.",
            "example": "123.45",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the ai chat was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the ai chat.",
            "example": "aich_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "message_count": {
            "description": "The total number of messages exchanged in this conversation.",
            "example": 42,
            "type": "integer"
          },
          "notification_preference": {
            "$ref": "#/components/schemas/AiChatNotificationPreferences",
            "description": "The notification preference for this AI chat. `all` delivers AI chat notifications and badges, while `none` mutes them."
          },
          "title": {
            "description": "A short descriptive title for this AI chat conversation. Null if no title has been set.",
            "example": "Weekly Revenue Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the ai chat was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this AI chat conversation.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "agent_identifier",
          "notification_preference",
          "message_count",
          "blended_token_usage",
          "created_at",
          "updated_at",
          "last_message_at",
          "user"
        ],
        "type": "object"
      },
      "AiChatMessageSourceTypes": {
        "description": "The source of an AI chat message",
        "enum": [
          "manual",
          "suggestion",
          "link"
        ],
        "type": "string"
      },
      "AiChatNotificationPreferences": {
        "description": "The notification preference for an AI chat",
        "enum": [
          "all",
          "none"
        ],
        "type": "string"
      },
      "ApiVersion": {
        "description": "The different API versions",
        "enum": [
          "v1",
          "v2",
          "v5"
        ],
        "type": "string"
      },
      "App": {
        "description": "An app is an integration built on Whop. Apps can serve consumers as experiences within products, or serve companies as business tools.",
        "properties": {
          "api_key": {
            "description": "The API key used to authenticate requests on behalf of this app. Null if no API key has been generated. Requires the 'developer:manage_api_key' permission.",
            "properties": {
              "created_at": {
                "description": "The datetime the private api key was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the private api key.",
                "type": "string"
              },
              "token": {
                "description": "This is the API key used to authenticate requests",
                "type": "string"
              }
            },
            "required": [
              "id",
              "token",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "app_type": {
            "$ref": "#/components/schemas/AppTypes",
            "description": "The target audience classification for this app (e.g., 'b2b_app', 'b2c_app', 'company_app', 'component')."
          },
          "base_url": {
            "description": "The production base URL where the app is hosted. `null` if no base URL is configured, or if the caller lacks the `developer:basic:read` permission on the app's account.",
            "example": "https://myapp.example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company that owns and publishes this app.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "creator": {
            "description": "The user who created and owns the company that published this app.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          },
          "dashboard_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "default_api_key": {
            "description": "The app's default API key, used to authenticate requests on behalf of this app. Null if the app has no default key. Requires the 'developer:manage_api_key' permission.",
            "properties": {
              "id": {
                "description": "The unique identifier for the authorized api key.",
                "type": "string"
              },
              "name": {
                "description": "A user set name to identify an API key",
                "type": [
                  "string",
                  "null"
                ]
              },
              "obfuscated_secret_key": {
                "description": "A masked version of the secret key used to authenticate requests. This is so that the owner can easily identify which key it is without being shown the full secret.",
                "type": "string"
              },
              "secret_key": {
                "description": "The secret key used to authenticate requests. This is only available if the current actor would have been able to create this api key.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "obfuscated_secret_key",
              "secret_key"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "description": {
            "description": "A written description of what this app does, displayed on the app store listing page. Null if no description has been set.",
            "example": "A comprehensive analytics dashboard for tracking revenue, members, and growth metrics.",
            "type": [
              "string",
              "null"
            ]
          },
          "discover_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "domain_id": {
            "description": "The unique subdomain identifier for this app's proxied URL on the Whop platform. Forms the URL pattern https://{domain_id}.apps.whop.com.",
            "example": "ab1c2d3e4f5g6h7i8j9k",
            "type": "string"
          },
          "experience_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "hosted_url": {
            "description": "The full canonical URL where this app's hosted web build is served. Null if the app has not claimed a route.",
            "example": "https://myapp.whop.site",
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the app.",
            "example": "app_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "marketplace_status": {
            "description": "The approval status of this app's product listing on the Whop app store. Null if the app has no associated product.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MarketplaceStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
            "example": "Courses",
            "type": "string"
          },
          "oauth_client_type": {
            "$ref": "#/components/schemas/AppOauthClientTypes",
            "description": "How this app authenticates when exchanging OAuth authorization and refresh grants."
          },
          "openapi_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "description": "The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.",
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": [
              "string",
              "null"
            ]
          },
          "production_web_build": {
            "description": "The approved app build currently served to users on web. Null if no production build is deployed for web.",
            "properties": {
              "checksum": {
                "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
                "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "type": "string"
              },
              "file_url": {
                "description": "A URL to download the app build as a .zip archive.",
                "example": "https://cdn.whop.com/builds/abc123.zip",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the app build.",
                "example": "apbu_xxxxxxxxxxxxx",
                "type": "string"
              },
              "source_url": {
                "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
                "example": "https://cdn.whop.com/builds/abc123-source.zip",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/AppBuildStatuses",
                "description": "The current review status of this build."
              }
            },
            "required": [
              "id",
              "file_url",
              "source_url",
              "checksum",
              "status"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "redirect_uris": {
            "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "requested_permissions": {
            "description": "The list of permissions this app requests when installed, including both required and optional permissions with justifications.",
            "items": {
              "description": "A permission that the app requests from the admin of a company during the oauth flow.",
              "properties": {
                "is_required": {
                  "description": "Whether the action is required for the app to function.",
                  "type": "boolean"
                },
                "justification": {
                  "description": "The reason for requesting the action.",
                  "type": "string"
                },
                "permission_action": {
                  "description": "The action that the app will request off of users when a user installs the app.",
                  "properties": {
                    "action": {
                      "description": "The identifier of the action.",
                      "type": "string"
                    },
                    "name": {
                      "description": "The human readable name of the action.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "action",
                    "name"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "permission_action",
                "is_required",
                "justification"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "route": {
            "description": "The unique subdomain route where this app's hosted web builds are served, such as 'myapp' for myapp.whop.site. Null if the app has not claimed a route.",
            "example": "myapp",
            "type": [
              "string",
              "null"
            ]
          },
          "secrets": {
            "additionalProperties": true,
            "description": "The app's secrets as an object of string values. Encrypted at rest and injected into the app's hosted server runtime as environment bindings. Requires the 'developer:update_app' permission.",
            "type": [
              "object",
              "null"
            ]
          },
          "skills_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "stats": {
            "description": "Aggregate usage statistics for this app, including daily, weekly, and monthly active user counts.",
            "properties": {
              "dau": {
                "description": "The number of unique users who have spent time in this app in the last 24 hours. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "mau": {
                "description": "The number of unique users who have spent time in this app in the last 28 days. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "time_spent_last24_hours": {
                "description": "The total time, in seconds, that all users have spent in this app over the last 24 hours. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "wau": {
                "description": "The number of unique users who have spent time in this app in the last 7 days. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              }
            },
            "required": [
              "dau",
              "mau",
              "time_spent_last24_hours",
              "wau"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppStatuses",
            "description": "The current visibility status of this app on the Whop app store. 'live' means publicly discoverable, 'unlisted' means accessible only via direct link, and 'hidden' means not visible anywhere."
          },
          "verified": {
            "description": "Whether this app has been verified by Whop. Verified apps are endorsed by Whop and displayed in the featured apps section of the app store.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "domain_id",
          "route",
          "hosted_url",
          "verified",
          "app_type",
          "origin",
          "experience_path",
          "discover_path",
          "dashboard_path",
          "skills_path",
          "openapi_path",
          "company",
          "icon",
          "creator",
          "requested_permissions",
          "stats",
          "api_key",
          "default_api_key",
          "production_web_build",
          "base_url",
          "redirect_uris",
          "secrets",
          "product_id",
          "marketplace_status",
          "oauth_client_type"
        ],
        "type": "object"
      },
      "AppBuild": {
        "description": "A versioned build artifact for a Whop React Native App, submitted for review and deployment to a specific platform.",
        "properties": {
          "checksum": {
            "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
            "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the app build was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "file_url": {
            "description": "A URL to download the app build as a .zip archive.",
            "example": "https://cdn.whop.com/builds/abc123.zip",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the app build.",
            "example": "apbu_xxxxxxxxxxxxx",
            "type": "string"
          },
          "is_production": {
            "description": "Whether this build is the currently active production build for its platform.",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/AppBuildPlatforms",
            "description": "The target platform for this build."
          },
          "review_message": {
            "description": "Feedback from the reviewer explaining why the build was rejected. Null if the build has not been reviewed or was approved.",
            "example": "App crashes on launch. Please fix and resubmit.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
            "example": "https://cdn.whop.com/builds/abc123-source.zip",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppBuildStatuses",
            "description": "The current review status of this build."
          },
          "supported_app_view_types": {
            "description": "The list of view types this build supports, as declared by the developer.",
            "items": {
              "$ref": "#/components/schemas/AppViewTypes"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "platform",
          "file_url",
          "source_url",
          "created_at",
          "status",
          "checksum",
          "supported_app_view_types",
          "review_message",
          "is_production"
        ],
        "type": "object"
      },
      "AppBuildListItem": {
        "description": "A versioned build artifact for a Whop React Native App, submitted for review and deployment to a specific platform.",
        "properties": {
          "checksum": {
            "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
            "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the app build was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "file_url": {
            "description": "A URL to download the app build as a .zip archive.",
            "example": "https://cdn.whop.com/builds/abc123.zip",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the app build.",
            "example": "apbu_xxxxxxxxxxxxx",
            "type": "string"
          },
          "is_production": {
            "description": "Whether this build is the currently active production build for its platform.",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/AppBuildPlatforms",
            "description": "The target platform for this build."
          },
          "review_message": {
            "description": "Feedback from the reviewer explaining why the build was rejected. Null if the build has not been reviewed or was approved.",
            "example": "App crashes on launch. Please fix and resubmit.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
            "example": "https://cdn.whop.com/builds/abc123-source.zip",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppBuildStatuses",
            "description": "The current review status of this build."
          },
          "supported_app_view_types": {
            "description": "The list of view types this build supports, as declared by the developer.",
            "items": {
              "$ref": "#/components/schemas/AppViewTypes"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "platform",
          "file_url",
          "source_url",
          "created_at",
          "status",
          "checksum",
          "supported_app_view_types",
          "review_message",
          "is_production"
        ],
        "type": "object"
      },
      "AppBuildPlatforms": {
        "description": "The different platforms an app build can target.",
        "enum": [
          "ios",
          "android",
          "web"
        ],
        "type": "string"
      },
      "AppBuildStatuses": {
        "description": "The different statuses an AppBuild can be in.",
        "enum": [
          "draft",
          "pending",
          "approved",
          "rejected"
        ],
        "type": "string"
      },
      "AppListItem": {
        "description": "An app is an integration built on Whop. Apps can serve consumers as experiences within products, or serve companies as business tools.",
        "properties": {
          "app_type": {
            "$ref": "#/components/schemas/AppTypes",
            "description": "The target audience classification for this app (e.g., 'b2b_app', 'b2c_app', 'company_app', 'component')."
          },
          "company": {
            "description": "The company that owns and publishes this app.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "creator": {
            "description": "The user who created and owns the company that published this app.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          },
          "dashboard_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "A written description of what this app does, displayed on the app store listing page. Null if no description has been set.",
            "example": "A comprehensive analytics dashboard for tracking revenue, members, and growth metrics.",
            "type": [
              "string",
              "null"
            ]
          },
          "discover_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "domain_id": {
            "description": "The unique subdomain identifier for this app's proxied URL on the Whop platform. Forms the URL pattern https://{domain_id}.apps.whop.com.",
            "example": "ab1c2d3e4f5g6h7i8j9k",
            "type": "string"
          },
          "experience_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "hosted_url": {
            "description": "The full canonical URL where this app's hosted web build is served. Null if the app has not claimed a route.",
            "example": "https://myapp.whop.site",
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the app.",
            "example": "app_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "name": {
            "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
            "example": "Courses",
            "type": "string"
          },
          "openapi_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "description": "The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.",
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "description": "The unique subdomain route where this app's hosted web builds are served, such as 'myapp' for myapp.whop.site. Null if the app has not claimed a route.",
            "example": "myapp",
            "type": [
              "string",
              "null"
            ]
          },
          "skills_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppStatuses",
            "description": "The current visibility status of this app on the Whop app store. 'live' means publicly discoverable, 'unlisted' means accessible only via direct link, and 'hidden' means not visible anywhere."
          },
          "verified": {
            "description": "Whether this app has been verified by Whop. Verified apps are endorsed by Whop and displayed in the featured apps section of the app store.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "domain_id",
          "route",
          "hosted_url",
          "verified",
          "app_type",
          "origin",
          "experience_path",
          "discover_path",
          "dashboard_path",
          "skills_path",
          "openapi_path",
          "company",
          "icon",
          "creator"
        ],
        "type": "object"
      },
      "AppOauthClientTypes": {
        "description": "How this app authenticates at the OAuth token endpoint.",
        "enum": [
          "public",
          "confidential"
        ],
        "type": "string"
      },
      "AppOrder": {
        "description": "The order to fetch the apps in for discovery.",
        "enum": [
          "created_at",
          "discoverable_at",
          "total_installs_last_30_days",
          "total_installs_last_7_days",
          "time_spent",
          "time_spent_last_24_hours",
          "daily_active_users",
          "ai_prompt_count",
          "total_ai_cost_usd",
          "total_ai_tokens",
          "last_ai_prompt_at",
          "ai_average_rating"
        ],
        "type": "string"
      },
      "AppStatuses": {
        "description": "The status of an experience interface",
        "enum": [
          "live",
          "unlisted",
          "hidden"
        ],
        "type": "string"
      },
      "AppTypes": {
        "description": "The type of end-user an app is built for",
        "enum": [
          "b2b_app",
          "b2c_app",
          "company_app",
          "component",
          "website"
        ],
        "type": "string"
      },
      "AppValidScopes": {
        "const": "read_user",
        "description": "These are the scopes an app can request on behalf of a user",
        "type": "string"
      },
      "AppViewTypes": {
        "description": "The different types of an app view",
        "enum": [
          "hub",
          "discover",
          "dash",
          "dashboard",
          "analytics",
          "skills",
          "openapi"
        ],
        "type": "string"
      },
      "AuthorizedUser": {
        "description": "A user who belongs to a company's team with access determined by their assigned role.",
        "properties": {
          "company": {
            "description": "The company this authorized user has access to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the authorized user.",
            "example": "ausr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/AuthorizedUserRoles",
            "description": "The permission role assigned to this authorized user within the company."
          },
          "user": {
            "description": "The user account linked to this authorized user record.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "role",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AuthorizedUserListItem": {
        "description": "A user who belongs to a company's team with access determined by their assigned role.",
        "properties": {
          "company": {
            "description": "The company this authorized user has access to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the authorized user.",
            "example": "ausr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/AuthorizedUserRoles",
            "description": "The permission role assigned to this authorized user within the company."
          },
          "user": {
            "description": "The user account linked to this authorized user record.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "role",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AuthorizedUserRoles": {
        "description": "Possible roles an authorized user can have",
        "enum": [
          "owner",
          "admin",
          "sales_manager",
          "moderator",
          "advertiser",
          "app_manager",
          "support",
          "manager",
          "workforce",
          "custom"
        ],
        "type": "string"
      },
      "BillingReasons": {
        "description": "The reason why a specific payment was billed",
        "enum": [
          "subscription_create",
          "subscription_cycle",
          "subscription_update",
          "one_time",
          "manual",
          "subscription"
        ],
        "type": "string"
      },
      "BountyTypes": {
        "description": "The available bounty implementation types.",
        "enum": [
          "classic",
          "user_funded",
          "workforce"
        ],
        "type": "string"
      },
      "BusinessGoalTypes": {
        "description": "What the poster is trying to accomplish with a workforce bounty. Used for product taxonomy and analytics, separate from the bounty's implementation type.",
        "enum": [
          "clipping",
          "post_engagement",
          "owned_account_growth",
          "ugc_content",
          "local_activation",
          "data_capture",
          "other"
        ],
        "type": "string"
      },
      "CancelOptions": {
        "description": "The different reasons a user can choose for why they are canceling their membership.",
        "enum": [
          "too_expensive",
          "switching",
          "missing_features",
          "technical_issues",
          "bad_experience",
          "other",
          "testing"
        ],
        "type": "string"
      },
      "CancelationStatus": {
        "description": "The state of a membership after a customer provides a cancelation reason.",
        "enum": [
          "won_back",
          "left",
          "canceling"
        ],
        "type": "string"
      },
      "CardBrands": {
        "description": "Possible card brands that a payment token can have",
        "enum": [
          "mastercard",
          "visa",
          "amex",
          "discover",
          "unionpay",
          "jcb",
          "diners",
          "link",
          "troy",
          "visadankort",
          "visabancontact",
          "china_union_pay",
          "rupay",
          "jcbrupay",
          "elo",
          "maestro",
          "tarjeta_naranja",
          "cirrus",
          "nspk_mir",
          "verve",
          "ebt",
          "private_label",
          "local_brand",
          "uatp",
          "wexcard",
          "uzcard",
          "meeza",
          "hrg_store_card",
          "girocard",
          "fuel_card",
          "dankort",
          "carnet",
          "atm_card",
          "china_union_payuzcard",
          "codensa",
          "cabal",
          "hipercard",
          "jcblankapay",
          "cmi",
          "aura",
          "accel",
          "culiance",
          "nyce",
          "pulse",
          "star",
          "unknown"
        ],
        "type": "string"
      },
      "CardFundingTypes": {
        "description": "The funding types of a card",
        "enum": [
          "credit",
          "debit",
          "prepaid"
        ],
        "type": "string"
      },
      "CardIssuingTransactionStatus": {
        "description": "The lifecycle status of a card transaction.",
        "enum": [
          "pending",
          "completed",
          "reversed",
          "declined"
        ],
        "type": "string"
      },
      "CardTransaction": {
        "description": "A card transaction record.",
        "properties": {
          "authorization_method": {
            "description": "How the card was presented or authenticated for the purchase.",
            "example": "ecommerce",
            "type": [
              "string",
              "null"
            ]
          },
          "card_id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "cashback_usd_amount": {
            "description": "The cashback reward amount earned on this transaction, in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the card transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The ISO 4217 currency code for the transaction amount.",
            "example": "USD",
            "type": [
              "string",
              "null"
            ]
          },
          "declined_reason": {
            "description": "The issuer-provided reason the transaction was declined.",
            "example": "insufficient_funds",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the card transaction.",
            "type": "string"
          },
          "international": {
            "description": "Whether the transaction was made with a merchant outside the card's home country.",
            "type": "boolean"
          },
          "local_amount": {
            "description": "The transaction amount in the merchant's local currency before conversion.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "memo": {
            "description": "A user-provided note attached to the transaction.",
            "example": "Team dinner",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category": {
            "description": "The enriched or raw category label for the merchant.",
            "example": "Software",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category_code": {
            "description": "The four-digit ISO 18245 merchant category code (MCC).",
            "example": "5734",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_icon_url": {
            "description": "A URL to the enriched merchant logo image.",
            "example": "https://logo.clearbit.com/example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_name": {
            "description": "The enriched or raw name of the merchant where the purchase was made.",
            "example": "Acme Corporation",
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "description": "When the transaction was settled by the card network.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CardIssuingTransactionStatus",
            "description": "The current lifecycle status of the transaction."
          },
          "transaction_type": {
            "description": "The type of transaction.",
            "example": "spend",
            "type": "string"
          },
          "usd_amount": {
            "description": "The transaction amount in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "usd_amount",
          "authorization_method",
          "created_at",
          "card_id",
          "cashback_usd_amount",
          "currency",
          "declined_reason",
          "international",
          "local_amount",
          "memo",
          "merchant_category",
          "merchant_category_code",
          "merchant_icon_url",
          "merchant_name",
          "posted_at",
          "status",
          "transaction_type"
        ],
        "type": "object"
      },
      "CardTransactionListItem": {
        "description": "A card transaction record.",
        "properties": {
          "authorization_method": {
            "description": "How the card was presented or authenticated for the purchase.",
            "example": "ecommerce",
            "type": [
              "string",
              "null"
            ]
          },
          "card_id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "cashback_usd_amount": {
            "description": "The cashback reward amount earned on this transaction, in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the card transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The ISO 4217 currency code for the transaction amount.",
            "example": "USD",
            "type": [
              "string",
              "null"
            ]
          },
          "declined_reason": {
            "description": "The issuer-provided reason the transaction was declined.",
            "example": "insufficient_funds",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the card transaction.",
            "type": "string"
          },
          "international": {
            "description": "Whether the transaction was made with a merchant outside the card's home country.",
            "type": "boolean"
          },
          "local_amount": {
            "description": "The transaction amount in the merchant's local currency before conversion.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "memo": {
            "description": "A user-provided note attached to the transaction.",
            "example": "Team dinner",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category": {
            "description": "The enriched or raw category label for the merchant.",
            "example": "Software",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category_code": {
            "description": "The four-digit ISO 18245 merchant category code (MCC).",
            "example": "5734",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_icon_url": {
            "description": "A URL to the enriched merchant logo image.",
            "example": "https://logo.clearbit.com/example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_name": {
            "description": "The enriched or raw name of the merchant where the purchase was made.",
            "example": "Acme Corporation",
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "description": "When the transaction was settled by the card network.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CardIssuingTransactionStatus",
            "description": "The current lifecycle status of the transaction."
          },
          "transaction_type": {
            "description": "The type of transaction.",
            "example": "spend",
            "type": "string"
          },
          "usd_amount": {
            "description": "The transaction amount in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "usd_amount",
          "authorization_method",
          "created_at",
          "card_id",
          "cashback_usd_amount",
          "currency",
          "declined_reason",
          "international",
          "local_amount",
          "memo",
          "merchant_category",
          "merchant_category_code",
          "merchant_icon_url",
          "merchant_name",
          "posted_at",
          "status",
          "transaction_type"
        ],
        "type": "object"
      },
      "ChatChannel": {
        "description": "A real-time chat feed attached to an experience, with configurable moderation and posting permissions.",
        "properties": {
          "ban_media": {
            "description": "Whether media uploads such as images and videos are blocked in this chat.",
            "type": "boolean"
          },
          "ban_urls": {
            "description": "Whether URL links are blocked from being posted in this chat.",
            "type": "boolean"
          },
          "banned_words": {
            "description": "A list of words that are automatically filtered from messages in this chat.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "experience": {
            "description": "The experience this chat feed is attached to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "user_posts_cooldown_seconds": {
            "description": "The minimum number of seconds a user must wait between consecutive messages. Null if no cooldown is enforced.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "who_can_post": {
            "$ref": "#/components/schemas/WhoCanPostTypes",
            "description": "The permission level controlling which users can send messages in this chat."
          },
          "who_can_react": {
            "$ref": "#/components/schemas/WhoCanReactTypes",
            "description": "The permission level controlling which users can add reactions in this chat."
          }
        },
        "required": [
          "id",
          "experience",
          "ban_media",
          "ban_urls",
          "who_can_post",
          "who_can_react",
          "user_posts_cooldown_seconds",
          "banned_words"
        ],
        "type": "object"
      },
      "ChatChannelListItem": {
        "description": "A real-time chat feed attached to an experience, with configurable moderation and posting permissions.",
        "properties": {
          "ban_media": {
            "description": "Whether media uploads such as images and videos are blocked in this chat.",
            "type": "boolean"
          },
          "ban_urls": {
            "description": "Whether URL links are blocked from being posted in this chat.",
            "type": "boolean"
          },
          "banned_words": {
            "description": "A list of words that are automatically filtered from messages in this chat.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "experience": {
            "description": "The experience this chat feed is attached to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "user_posts_cooldown_seconds": {
            "description": "The minimum number of seconds a user must wait between consecutive messages. Null if no cooldown is enforced.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "who_can_post": {
            "$ref": "#/components/schemas/WhoCanPostTypes",
            "description": "The permission level controlling which users can send messages in this chat."
          },
          "who_can_react": {
            "$ref": "#/components/schemas/WhoCanReactTypes",
            "description": "The permission level controlling which users can add reactions in this chat."
          }
        },
        "required": [
          "id",
          "experience",
          "ban_media",
          "ban_urls",
          "who_can_post",
          "who_can_react",
          "user_posts_cooldown_seconds",
          "banned_words"
        ],
        "type": "object"
      },
      "CheckoutConfiguration": {
        "description": "A checkout configuration is a reusable configuration for a checkout, including the plan, affiliate, and custom metadata. Payments and memberships created from a checkout session inherit its metadata.",
        "properties": {
          "account_id": {
            "description": "The ID of the account to use for the checkout configuration",
            "type": "string"
          },
          "affiliate_code": {
            "description": "The affiliate code to use for the checkout configuration",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The ID of the account to use for the checkout configuration",
            "type": "string"
          },
          "currency": {
            "description": "The currency to use for the configuration when in 'setup' mode. This is used to target which currency specific payment methods are available. If not provided, it will default to 'usd' when in setup mode.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the checkout session.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The metadata to use for the checkout configuration",
            "type": [
              "object",
              "null"
            ]
          },
          "mode": {
            "$ref": "#/components/schemas/CheckoutModes",
            "description": "The mode of the checkout session."
          },
          "payment_method_configuration": {
            "description": "The explicit payment method configuration for the session, if any. This currently only works in 'setup' mode. Use the plan's payment_method_configuration for payment method.",
            "properties": {
              "disabled": {
                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "enabled": {
                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "include_platform_defaults": {
                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                "type": "boolean"
              }
            },
            "required": [
              "enabled",
              "disabled",
              "include_platform_defaults"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan to use for the checkout configuration",
            "properties": {
              "adaptive_pricing_enabled": {
                "description": "Whether the creator has turned on adaptive pricing for this plan. Raw setting — does not check processor compatibility or feature flags.",
                "type": "boolean"
              },
              "billing_period": {
                "description": "Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "expiration_days": {
                "description": "Access duration in days for expiration-based plans, such as 365 for a one-year pass.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "initial_price": {
                "description": "The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99). For one-time plans, this is the full price. For renewal plans, this is charged on top of the first renewal_price.",
                "example": 6.9,
                "type": "number"
              },
              "plan_type": {
                "$ref": "#/components/schemas/PlanTypes",
                "description": "The billing model for this plan: 'renewal' for recurring subscriptions or 'one_time' for single payments."
              },
              "release_method": {
                "$ref": "#/components/schemas/ReleaseMethod",
                "description": "Sales method for this plan: `buy_now` for immediate purchase or `waitlist` for waitlist-based access."
              },
              "renewal_price": {
                "description": "The recurring price charged every billing_period in the plan's base_currency (e.g., 9.99 for $9.99/period). Zero for one-time plans.",
                "example": 6.9,
                "type": "number"
              },
              "three_ds_level": {
                "description": "The 3D Secure behavior for this plan. Null means the plan inherits the account default.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PlanThreeDsLevels"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trial_period_days": {
                "description": "Free trial days before first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility",
                "description": "Controls whether the plan is visible to customers. When set to 'hidden', the plan is only accessible via direct link."
              }
            },
            "required": [
              "id",
              "visibility",
              "plan_type",
              "release_method",
              "currency",
              "billing_period",
              "expiration_days",
              "initial_price",
              "renewal_price",
              "trial_period_days",
              "three_ds_level",
              "adaptive_pricing_enabled"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "purchase_url": {
            "description": "A URL you can send to customers to complete a checkout. It looks like `/checkout/ch_xxxx/`",
            "type": "string"
          },
          "redirect_url": {
            "description": "The URL to redirect the user to after the checkout configuration is created",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "account_id",
          "mode",
          "currency",
          "plan",
          "affiliate_code",
          "metadata",
          "redirect_url",
          "purchase_url",
          "payment_method_configuration"
        ],
        "type": "object"
      },
      "CheckoutConfigurationListItem": {
        "description": "A checkout configuration is a reusable configuration for a checkout, including the plan, affiliate, and custom metadata. Payments and memberships created from a checkout session inherit its metadata.",
        "properties": {
          "account_id": {
            "description": "The ID of the account to use for the checkout configuration",
            "type": "string"
          },
          "affiliate_code": {
            "description": "The affiliate code to use for the checkout configuration",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The ID of the account to use for the checkout configuration",
            "type": "string"
          },
          "currency": {
            "description": "The currency to use for the configuration when in 'setup' mode. This is used to target which currency specific payment methods are available. If not provided, it will default to 'usd' when in setup mode.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the checkout session.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The metadata to use for the checkout configuration",
            "type": [
              "object",
              "null"
            ]
          },
          "mode": {
            "$ref": "#/components/schemas/CheckoutModes",
            "description": "The mode of the checkout session."
          },
          "payment_method_configuration": {
            "description": "The explicit payment method configuration for the session, if any. This currently only works in 'setup' mode. Use the plan's payment_method_configuration for payment method.",
            "properties": {
              "disabled": {
                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "enabled": {
                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "include_platform_defaults": {
                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                "type": "boolean"
              }
            },
            "required": [
              "enabled",
              "disabled",
              "include_platform_defaults"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan to use for the checkout configuration",
            "properties": {
              "adaptive_pricing_enabled": {
                "description": "Whether the creator has turned on adaptive pricing for this plan. Raw setting — does not check processor compatibility or feature flags.",
                "type": "boolean"
              },
              "billing_period": {
                "description": "Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "expiration_days": {
                "description": "Access duration in days for expiration-based plans, such as 365 for a one-year pass.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "initial_price": {
                "description": "The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99). For one-time plans, this is the full price. For renewal plans, this is charged on top of the first renewal_price.",
                "example": 6.9,
                "type": "number"
              },
              "plan_type": {
                "$ref": "#/components/schemas/PlanTypes",
                "description": "The billing model for this plan: 'renewal' for recurring subscriptions or 'one_time' for single payments."
              },
              "release_method": {
                "$ref": "#/components/schemas/ReleaseMethod",
                "description": "Sales method for this plan: `buy_now` for immediate purchase or `waitlist` for waitlist-based access."
              },
              "renewal_price": {
                "description": "The recurring price charged every billing_period in the plan's base_currency (e.g., 9.99 for $9.99/period). Zero for one-time plans.",
                "example": 6.9,
                "type": "number"
              },
              "three_ds_level": {
                "description": "The 3D Secure behavior for this plan. Null means the plan inherits the account default.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PlanThreeDsLevels"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trial_period_days": {
                "description": "Free trial days before first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility",
                "description": "Controls whether the plan is visible to customers. When set to 'hidden', the plan is only accessible via direct link."
              }
            },
            "required": [
              "id",
              "visibility",
              "plan_type",
              "release_method",
              "currency",
              "billing_period",
              "expiration_days",
              "initial_price",
              "renewal_price",
              "trial_period_days",
              "three_ds_level",
              "adaptive_pricing_enabled"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "purchase_url": {
            "description": "A URL you can send to customers to complete a checkout. It looks like `/checkout/ch_xxxx/`",
            "type": "string"
          },
          "redirect_url": {
            "description": "The URL to redirect the user to after the checkout configuration is created",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "account_id",
          "mode",
          "currency",
          "plan",
          "affiliate_code",
          "metadata",
          "redirect_url",
          "purchase_url",
          "payment_method_configuration"
        ],
        "type": "object"
      },
      "CheckoutFonts": {
        "description": "The different font families available for checkout pages.",
        "enum": [
          "system",
          "roboto",
          "open_sans"
        ],
        "type": "string"
      },
      "CheckoutModes": {
        "description": "The different modes a checkout can be set to.",
        "enum": [
          "payment",
          "setup"
        ],
        "type": "string"
      },
      "CheckoutShapes": {
        "description": "The different border-radius styles available for checkout pages.",
        "enum": [
          "rounded",
          "pill",
          "rectangular"
        ],
        "type": "string"
      },
      "CompanyTokenTransaction": {
        "description": "A token transaction records a credit or debit to a member's token balance within a company, including transfers between members.",
        "properties": {
          "amount": {
            "description": "The token amount for this transaction. Always a positive value regardless of transaction type.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company whose token balance this transaction affects.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the company token transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "Free-text description explaining the reason for this token transaction. Null if no description was provided.",
            "example": "Reward for completing onboarding",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company token transaction.",
            "type": "string"
          },
          "idempotency_key": {
            "description": "A unique key used to prevent duplicate transactions when retrying API requests. Null if no idempotency key was provided.",
            "example": "txn_reward_usr_123_2024",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_transaction_id": {
            "description": "The ID of the corresponding transaction on the other side of a transfer. Null if this is not a transfer transaction.",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "transaction_type": {
            "$ref": "#/components/schemas/CompanyTokenTransactionTypes",
            "description": "The direction of this token transaction (add, subtract, or transfer)."
          },
          "user": {
            "description": "The user whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "transaction_type",
          "amount",
          "description",
          "created_at",
          "linked_transaction_id",
          "idempotency_key",
          "user",
          "member",
          "company"
        ],
        "type": "object"
      },
      "CompanyTokenTransactionListItem": {
        "description": "A token transaction records a credit or debit to a member's token balance within a company, including transfers between members.",
        "properties": {
          "amount": {
            "description": "The token amount for this transaction. Always a positive value regardless of transaction type.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company whose token balance this transaction affects.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the company token transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "Free-text description explaining the reason for this token transaction. Null if no description was provided.",
            "example": "Reward for completing onboarding",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company token transaction.",
            "type": "string"
          },
          "idempotency_key": {
            "description": "A unique key used to prevent duplicate transactions when retrying API requests. Null if no idempotency key was provided.",
            "example": "txn_reward_usr_123_2024",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_transaction_id": {
            "description": "The ID of the corresponding transaction on the other side of a transfer. Null if this is not a transfer transaction.",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "transaction_type": {
            "$ref": "#/components/schemas/CompanyTokenTransactionTypes",
            "description": "The direction of this token transaction (add, subtract, or transfer)."
          },
          "user": {
            "description": "The user whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "transaction_type",
          "amount",
          "description",
          "created_at",
          "linked_transaction_id",
          "idempotency_key",
          "user",
          "member",
          "company"
        ],
        "type": "object"
      },
      "CompanyTokenTransactionTypes": {
        "description": "The type of token transaction",
        "enum": [
          "add",
          "subtract",
          "transfer"
        ],
        "type": "string"
      },
      "Course": {
        "description": "A structured learning module containing chapters and lessons, belonging to an experience.",
        "properties": {
          "certificate_after_completion_enabled": {
            "description": "Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "chapters": {
            "description": "An ordered list of all chapters in this course, sorted by their display position.",
            "items": {
              "description": "A grouping of related lessons within a course, used to organize content into sections.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the chapter.",
                  "example": "chap_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "lessons": {
                  "description": "An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users.",
                  "items": {
                    "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
                    "properties": {
                      "id": {
                        "description": "The unique identifier for the lesson.",
                        "example": "lesn_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "lesson_type": {
                        "$ref": "#/components/schemas/LessonTypes",
                        "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
                      },
                      "order": {
                        "description": "The sort position of this lesson within its parent chapter, starting from zero.",
                        "example": 42,
                        "type": "integer"
                      },
                      "thumbnail": {
                        "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
                        "properties": {
                          "url": {
                            "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                            "example": "https://media.whop.com/abc123/optimized.jpg",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "url"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                        "example": "Understanding Candlestick Patterns",
                        "type": "string"
                      },
                      "video_asset": {
                        "description": "The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.",
                        "properties": {
                          "duration_seconds": {
                            "description": "The duration of the video in seconds",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "signed_playback_id": {
                            "description": "The signed playback ID of the Mux asset",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "signed_thumbnail_playback_token": {
                            "description": "The signed thumbnail playback token of the Mux asset",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "signed_playback_id",
                          "signed_thumbnail_playback_token",
                          "duration_seconds"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "lesson_type",
                      "title",
                      "order",
                      "video_asset",
                      "thumbnail"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "order": {
                  "description": "The sort position of this chapter within its parent course, starting from zero.",
                  "example": 42,
                  "type": "integer"
                },
                "title": {
                  "description": "The display name of the chapter shown to students. Maximum 150 characters.",
                  "example": "Getting Started",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "order",
                "lessons"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "chapters_count": {
            "description": "The total number of chapters in this course, including chapters whose lessons are all hidden from the current user.",
            "example": 42,
            "type": "integer"
          },
          "completed_lessons_count": {
            "description": "The number of lessons in this course that the current user has marked as completed. Zero when the request is not made on behalf of a user.",
            "example": 42,
            "type": "integer"
          },
          "cover_image": {
            "description": "The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.",
            "example": "https://assets.whop.com/images/course-cover.jpg",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the course was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A brief summary of the course content and objectives. Null if no description has been set.",
            "example": "Learn advanced trading strategies from industry experts.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the course.",
            "example": "cors_xxxxxxxxxxxxx",
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/Languages",
            "description": "The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg."
          },
          "latest_lesson_created_at": {
            "description": "The creation timestamp of the most recently added lesson visible to the current user. Null if the course has no lessons.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "lesson_unlock_days": {
            "description": "The distinct drip schedules, in days after the course start, of lessons visible to the current user. Combine with startedAt to work out which have unlocked. Empty when the user has not started the course or no lesson is on a schedule.",
            "items": {
              "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
              "example": 42,
              "type": "integer"
            },
            "type": "array"
          },
          "order": {
            "description": "The sort position of this course within its parent experience, as a decimal for flexible ordering.",
            "example": "123.45",
            "type": "string"
          },
          "require_completing_lessons_in_order": {
            "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
            "type": "boolean"
          },
          "resume_lesson": {
            "description": "The lesson the current user should continue from: their first incomplete lesson, or the first lesson when they have finished the course, have not started it, or can edit it. Null if the course has no lessons.",
            "properties": {
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "started_at": {
            "description": "The earliest time the current user is known to have started this course. Null if they have not started it. Drip unlock schedules are measured from this point.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "tagline": {
            "description": "A short marketing tagline displayed beneath the course title. Null if no tagline has been set.",
            "example": "Master the fundamentals in 30 days",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "optimized_url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "description": "The original source URL of the attachment, such as a direct link to S3. This should never be displayed on the client and should always be passed through an Imgproxy transformer.",
                "example": "https://media.whop.com/abc123/original.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "optimized_url",
              "source_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the course shown to students. Null if no title has been set.",
            "example": "Introduction to Technical Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "total_duration_seconds": {
            "description": "The combined duration in seconds of every hosted video across the lessons visible to the current user.",
            "example": 42,
            "type": "integer"
          },
          "total_lessons_count": {
            "description": "The number of lessons in this course visible to the current user.",
            "example": 42,
            "type": "integer"
          },
          "updated_at": {
            "description": "The datetime the course was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/CourseVisibilities",
            "description": "The visibility setting that controls whether this course appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "tagline",
          "cover_image",
          "thumbnail",
          "description",
          "language",
          "certificate_after_completion_enabled",
          "require_completing_lessons_in_order",
          "order",
          "visibility",
          "created_at",
          "updated_at",
          "chapters_count",
          "total_lessons_count",
          "completed_lessons_count",
          "total_duration_seconds",
          "latest_lesson_created_at",
          "started_at",
          "lesson_unlock_days",
          "resume_lesson",
          "chapters"
        ],
        "type": "object"
      },
      "CourseChapter": {
        "description": "A grouping of related lessons within a course, used to organize content into sections.",
        "properties": {
          "id": {
            "description": "The unique identifier for the chapter.",
            "example": "chap_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lessons": {
            "description": "An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users.",
            "items": {
              "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the lesson.",
                  "example": "lesn_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "order": {
                  "description": "The sort position of this lesson within its parent chapter, starting from zero.",
                  "example": 42,
                  "type": "integer"
                },
                "title": {
                  "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                  "example": "Understanding Candlestick Patterns",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "order"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "order": {
            "description": "The sort position of this chapter within its parent course, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "title": {
            "description": "The display name of the chapter shown to students. Maximum 150 characters.",
            "example": "Getting Started",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lessons"
        ],
        "type": "object"
      },
      "CourseChapterListItem": {
        "description": "A grouping of related lessons within a course, used to organize content into sections.",
        "properties": {
          "id": {
            "description": "The unique identifier for the chapter.",
            "example": "chap_xxxxxxxxxxxxx",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this chapter within its parent course, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "title": {
            "description": "The display name of the chapter shown to students. Maximum 150 characters.",
            "example": "Getting Started",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "order"
        ],
        "type": "object"
      },
      "CourseLesson": {
        "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
        "properties": {
          "assessment_questions": {
            "description": "The list of questions for quiz or knowledge check lessons. Empty for non-assessment lesson types.",
            "items": {
              "description": "An assessment question in a course quiz or knowledge check",
              "properties": {
                "correct_answer": {
                  "description": "The correct answer for the question. Used for short answer questions. Only visible to admins (users with courses:update permission)",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "description": "The datetime the assessment question was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the assessment question.",
                  "example": "crsaq_xxxxxxxxxxxx",
                  "type": "string"
                },
                "image": {
                  "description": "Optional image attachment for the question",
                  "properties": {
                    "content_type": {
                      "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                      "example": "image/jpeg",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filename": {
                      "description": "The original filename of the uploaded attachment, including its file extension.",
                      "example": "document.pdf",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "url": {
                      "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                      "example": "https://media.whop.com/abc123/optimized.jpg",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "filename",
                    "content_type",
                    "url"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "options": {
                  "description": "The answer options for multiple choice/select questions",
                  "items": {
                    "description": "An answer option for a multiple choice or multiple select assessment question",
                    "properties": {
                      "id": {
                        "description": "The unique identifier for the assessment question option.",
                        "example": "crsaqo_xxxxxxxxxxx",
                        "type": "string"
                      },
                      "is_correct": {
                        "description": "Whether this option is a correct answer. Only visible to admins (users with courses:update permission)",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "option_text": {
                        "description": "The text of the answer option",
                        "type": "string"
                      },
                      "order": {
                        "description": "The order of this option within the question",
                        "example": 42,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id",
                      "option_text",
                      "is_correct",
                      "order"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "order": {
                  "description": "The order of the question within its lesson",
                  "example": 42,
                  "type": "integer"
                },
                "question_text": {
                  "description": "The text of the question",
                  "type": "string"
                },
                "question_type": {
                  "$ref": "#/components/schemas/CoursesAssessmentQuestionTypes",
                  "description": "The type of the question"
                }
              },
              "required": [
                "id",
                "question_text",
                "question_type",
                "correct_answer",
                "order",
                "created_at",
                "image",
                "options"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "attachments": {
            "description": "All supplementary files attached to this lesson returned as a flat array rather than a paginated connection.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "content": {
            "description": "The Markdown content body of the lesson. Null if the lesson has no text content.",
            "example": "In this lesson, we will cover the basics of technical analysis...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the lesson was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "days_from_course_start_until_unlock": {
            "description": "The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "embed_id": {
            "description": "The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.",
            "example": "dQw4w9WgXcQ",
            "type": [
              "string",
              "null"
            ]
          },
          "embed_type": {
            "description": "The platform type for the embedded video. One of: youtube, loom. Null if the lesson has no embed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EmbedTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the lesson.",
            "example": "lesn_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lesson_type": {
            "$ref": "#/components/schemas/LessonTypes",
            "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
          },
          "main_pdf": {
            "description": "The primary PDF document for PDF-type lessons. Null if this lesson is not a PDF lesson or no PDF has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "order": {
            "description": "The sort position of this lesson within its parent chapter, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the lesson shown to students. Maximum 120 characters.",
            "example": "Understanding Candlestick Patterns",
            "type": "string"
          },
          "video_asset": {
            "description": "The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.",
            "properties": {
              "asset_id": {
                "description": "The Mux-provided ID of the asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "audio_only": {
                "description": "Whether this asset contains only audio",
                "type": "boolean"
              },
              "created_at": {
                "description": "The datetime the mux asset was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "duration_seconds": {
                "description": "The duration of the video in seconds",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "finished_uploading_at": {
                "description": "The time at which the video finished uploading",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the mux asset.",
                "example": "mux_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "playback_id": {
                "description": "The public playback ID of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_playback_id": {
                "description": "The signed playback ID of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_storyboard_playback_token": {
                "description": "The signed storyboard playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_thumbnail_playback_token": {
                "description": "The signed thumbnail playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_video_playback_token": {
                "description": "The signed video playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MuxAssetStatuses",
                "description": "The status of the Mux asset"
              },
              "updated_at": {
                "description": "The datetime the mux asset was last updated.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "id",
              "asset_id",
              "playback_id",
              "signed_playback_id",
              "status",
              "audio_only",
              "duration_seconds",
              "signed_video_playback_token",
              "signed_thumbnail_playback_token",
              "signed_storyboard_playback_token",
              "created_at",
              "updated_at",
              "finished_uploading_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/LessonVisibilities",
            "description": "The visibility setting that controls whether this lesson appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lesson_type",
          "visibility",
          "content",
          "days_from_course_start_until_unlock",
          "embed_type",
          "embed_id",
          "created_at",
          "thumbnail",
          "video_asset",
          "main_pdf",
          "assessment_questions",
          "attachments"
        ],
        "type": "object"
      },
      "CourseLessonInteraction": {
        "description": "A record of a user's progress on a specific lesson, tracking whether they have completed it.",
        "properties": {
          "completed": {
            "description": "Whether the user has finished this lesson.",
            "type": "boolean"
          },
          "course": {
            "description": "The course that contains the tracked lesson.",
            "properties": {
              "experience": {
                "description": "The parent experience that this course belongs to.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the experience.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the course.",
                "example": "cors_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the course shown to students. Null if no title has been set.",
                "example": "Introduction to Technical Analysis",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "experience"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the lesson interaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lesson interaction.",
            "example": "crsli_xxxxxxxxxxxx",
            "type": "string"
          },
          "lesson": {
            "description": "The lesson that this progress record belongs to.",
            "properties": {
              "chapter": {
                "description": "The parent chapter that contains this lesson.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the chapter.",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                "example": "Understanding Candlestick Patterns",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "chapter"
            ],
            "type": "object"
          },
          "user": {
            "description": "The user whose progress is being tracked.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed",
          "created_at",
          "lesson",
          "user",
          "course"
        ],
        "type": "object"
      },
      "CourseLessonInteractionListItem": {
        "description": "A record of a user's progress on a specific lesson, tracking whether they have completed it.",
        "properties": {
          "completed": {
            "description": "Whether the user has finished this lesson.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the lesson interaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lesson interaction.",
            "example": "crsli_xxxxxxxxxxxx",
            "type": "string"
          },
          "lesson": {
            "description": "The lesson that this progress record belongs to.",
            "properties": {
              "chapter": {
                "description": "The parent chapter that contains this lesson.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the chapter.",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                "example": "Understanding Candlestick Patterns",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "chapter"
            ],
            "type": "object"
          },
          "user": {
            "description": "The user whose progress is being tracked.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed",
          "created_at",
          "lesson",
          "user"
        ],
        "type": "object"
      },
      "CourseLessonListItem": {
        "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
        "properties": {
          "content": {
            "description": "The Markdown content body of the lesson. Null if the lesson has no text content.",
            "example": "In this lesson, we will cover the basics of technical analysis...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the lesson was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "days_from_course_start_until_unlock": {
            "description": "The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "embed_id": {
            "description": "The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.",
            "example": "dQw4w9WgXcQ",
            "type": [
              "string",
              "null"
            ]
          },
          "embed_type": {
            "description": "The platform type for the embedded video. One of: youtube, loom. Null if the lesson has no embed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EmbedTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the lesson.",
            "example": "lesn_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lesson_type": {
            "$ref": "#/components/schemas/LessonTypes",
            "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
          },
          "order": {
            "description": "The sort position of this lesson within its parent chapter, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the lesson shown to students. Maximum 120 characters.",
            "example": "Understanding Candlestick Patterns",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/LessonVisibilities",
            "description": "The visibility setting that controls whether this lesson appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lesson_type",
          "visibility",
          "content",
          "days_from_course_start_until_unlock",
          "embed_type",
          "embed_id",
          "created_at",
          "thumbnail"
        ],
        "type": "object"
      },
      "CourseListItem": {
        "description": "A structured learning module containing chapters and lessons, belonging to an experience.",
        "properties": {
          "certificate_after_completion_enabled": {
            "description": "Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "chapters_count": {
            "description": "The total number of chapters in this course, including chapters whose lessons are all hidden from the current user.",
            "example": 42,
            "type": "integer"
          },
          "completed_lessons_count": {
            "description": "The number of lessons in this course that the current user has marked as completed. Zero when the request is not made on behalf of a user.",
            "example": 42,
            "type": "integer"
          },
          "cover_image": {
            "description": "The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.",
            "example": "https://assets.whop.com/images/course-cover.jpg",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the course was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A brief summary of the course content and objectives. Null if no description has been set.",
            "example": "Learn advanced trading strategies from industry experts.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the course.",
            "example": "cors_xxxxxxxxxxxxx",
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/Languages",
            "description": "The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg."
          },
          "latest_lesson_created_at": {
            "description": "The creation timestamp of the most recently added lesson visible to the current user. Null if the course has no lessons.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "lesson_unlock_days": {
            "description": "The distinct drip schedules, in days after the course start, of lessons visible to the current user. Combine with startedAt to work out which have unlocked. Empty when the user has not started the course or no lesson is on a schedule.",
            "items": {
              "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
              "example": 42,
              "type": "integer"
            },
            "type": "array"
          },
          "order": {
            "description": "The sort position of this course within its parent experience, as a decimal for flexible ordering.",
            "example": "123.45",
            "type": "string"
          },
          "require_completing_lessons_in_order": {
            "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
            "type": "boolean"
          },
          "resume_lesson": {
            "description": "The lesson the current user should continue from: their first incomplete lesson, or the first lesson when they have finished the course, have not started it, or can edit it. Null if the course has no lessons.",
            "properties": {
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "started_at": {
            "description": "The earliest time the current user is known to have started this course. Null if they have not started it. Drip unlock schedules are measured from this point.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "tagline": {
            "description": "A short marketing tagline displayed beneath the course title. Null if no tagline has been set.",
            "example": "Master the fundamentals in 30 days",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "optimized_url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "description": "The original source URL of the attachment, such as a direct link to S3. This should never be displayed on the client and should always be passed through an Imgproxy transformer.",
                "example": "https://media.whop.com/abc123/original.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "optimized_url",
              "source_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the course shown to students. Null if no title has been set.",
            "example": "Introduction to Technical Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "total_duration_seconds": {
            "description": "The combined duration in seconds of every hosted video across the lessons visible to the current user.",
            "example": 42,
            "type": "integer"
          },
          "total_lessons_count": {
            "description": "The number of lessons in this course visible to the current user.",
            "example": 42,
            "type": "integer"
          },
          "updated_at": {
            "description": "The datetime the course was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/CourseVisibilities",
            "description": "The visibility setting that controls whether this course appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "tagline",
          "cover_image",
          "thumbnail",
          "description",
          "language",
          "certificate_after_completion_enabled",
          "require_completing_lessons_in_order",
          "order",
          "visibility",
          "created_at",
          "updated_at",
          "chapters_count",
          "total_lessons_count",
          "completed_lessons_count",
          "total_duration_seconds",
          "latest_lesson_created_at",
          "started_at",
          "lesson_unlock_days",
          "resume_lesson"
        ],
        "type": "object"
      },
      "CourseStudent": {
        "description": "An enrollment record for a student in a course, including progress and completion metrics.",
        "properties": {
          "completed_lessons_count": {
            "description": "The total number of lessons this student has marked as completed in the course.",
            "example": 42,
            "type": "integer"
          },
          "completion_rate": {
            "description": "The percentage of available lessons the student has completed, as a value from 0 to 100 rounded to two decimal places.",
            "example": 6.9,
            "type": "number"
          },
          "course": {
            "description": "The course this student is enrolled in.",
            "properties": {
              "experience": {
                "description": "The parent experience that this course belongs to.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the experience.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the course.",
                "example": "cors_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the course shown to students. Null if no title has been set.",
                "example": "Introduction to Technical Analysis",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "experience"
            ],
            "type": "object"
          },
          "first_interaction_at": {
            "description": "The timestamp when the student first interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the course student type.",
            "type": "string"
          },
          "last_interaction_at": {
            "description": "The timestamp when the student most recently interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "total_lessons_count": {
            "description": "The total number of visible lessons available to this student in the course.",
            "example": 42,
            "type": "integer"
          },
          "user": {
            "description": "The user profile of the enrolled student.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed_lessons_count",
          "completion_rate",
          "total_lessons_count",
          "first_interaction_at",
          "last_interaction_at",
          "user",
          "course"
        ],
        "type": "object"
      },
      "CourseStudentListItem": {
        "description": "An enrollment record for a student in a course, including progress and completion metrics.",
        "properties": {
          "completed_lessons_count": {
            "description": "The total number of lessons this student has marked as completed in the course.",
            "example": 42,
            "type": "integer"
          },
          "completion_rate": {
            "description": "The percentage of available lessons the student has completed, as a value from 0 to 100 rounded to two decimal places.",
            "example": 6.9,
            "type": "number"
          },
          "first_interaction_at": {
            "description": "The timestamp when the student first interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the course student type.",
            "type": "string"
          },
          "last_interaction_at": {
            "description": "The timestamp when the student most recently interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "total_lessons_count": {
            "description": "The total number of visible lessons available to this student in the course.",
            "example": 42,
            "type": "integer"
          },
          "user": {
            "description": "The user profile of the enrolled student.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed_lessons_count",
          "completion_rate",
          "total_lessons_count",
          "first_interaction_at",
          "last_interaction_at",
          "user"
        ],
        "type": "object"
      },
      "CourseVisibilities": {
        "description": "The available visibilities for a course. Determines how / whether a course is visible to users.",
        "enum": [
          "visible",
          "hidden"
        ],
        "type": "string"
      },
      "CoursesAssessmentQuestionTypes": {
        "description": "The available types for an assessment question",
        "enum": [
          "short_answer",
          "true_false",
          "multiple_choice",
          "multiple_select"
        ],
        "type": "string"
      },
      "Currencies": {
        "description": "The available currencies on the platform",
        "enum": [
          "usd",
          "sgd",
          "inr",
          "aud",
          "brl",
          "cad",
          "dkk",
          "eur",
          "nok",
          "gbp",
          "sek",
          "chf",
          "hkd",
          "huf",
          "jpy",
          "mxn",
          "myr",
          "pln",
          "czk",
          "nzd",
          "aed",
          "eth",
          "ape",
          "cop",
          "ron",
          "thb",
          "bgn",
          "idr",
          "dop",
          "php",
          "try",
          "krw",
          "twd",
          "vnd",
          "pkr",
          "clp",
          "uyu",
          "ars",
          "zar",
          "dzd",
          "tnd",
          "mad",
          "kes",
          "kwd",
          "jod",
          "all",
          "xcd",
          "amd",
          "bsd",
          "bhd",
          "bob",
          "bam",
          "khr",
          "crc",
          "xof",
          "egp",
          "etb",
          "gmd",
          "ghs",
          "gtq",
          "gyd",
          "ils",
          "jmd",
          "mop",
          "mga",
          "mur",
          "mdl",
          "mnt",
          "nad",
          "ngn",
          "mkd",
          "omr",
          "pyg",
          "pen",
          "qar",
          "rwf",
          "sar",
          "rsd",
          "lkr",
          "tzs",
          "ttd",
          "uzs",
          "rub",
          "btc",
          "cny",
          "usdt",
          "kzt",
          "awg",
          "whop_usd",
          "xau"
        ],
        "type": "string"
      },
      "CustomCtas": {
        "description": "The different types of custom CTAs that can be selected.",
        "enum": [
          "get_access",
          "join",
          "order_now",
          "shop_now",
          "call_now",
          "donate_now",
          "contact_us",
          "sign_up",
          "subscribe",
          "purchase",
          "get_offer",
          "apply_now",
          "complete_order"
        ],
        "type": "string"
      },
      "CustomFieldTypes": {
        "const": "text",
        "description": "The type of the custom field.",
        "type": "string"
      },
      "Direction": {
        "description": "The direction of the sort.",
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "Dispute": {
        "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
        "properties": {
          "access_activity_log": {
            "description": "A log of IP-based access activity for the customer on Whop, submitted as evidence in the dispute.",
            "example": "192.168.1.1 - 2024-01-15 12:00:00 UTC",
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "The disputed amount in the specified currency, formatted as a decimal.",
            "example": 6.9,
            "type": "number"
          },
          "billing_address": {
            "description": "The customer's billing address from their payment details, submitted as evidence in the dispute.",
            "example": "123 Main St, New York, NY 10001",
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_policy_attachment": {
            "description": "The cancellation policy document uploaded as dispute evidence. Null if no cancellation policy has been provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "cancellation_policy_disclosure": {
            "description": "A text disclosure describing the company's cancellation policy, submitted as dispute evidence.",
            "example": "All sales are final. No refunds after 30 days.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company that the dispute was filed against.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the dispute was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the disputed amount."
          },
          "customer_communication_attachment": {
            "description": "Evidence of customer communication or product usage, uploaded as a dispute attachment. Null if not provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "customer_email_address": {
            "description": "The customer's email address from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "description": "The customer's full name from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.",
            "example": "Jane Doe",
            "type": [
              "string",
              "null"
            ]
          },
          "editable": {
            "description": "Whether the dispute evidence can still be edited and submitted.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the dispute.",
            "example": "dspt_xxxxxxxxxxxxx",
            "type": "string"
          },
          "needs_response_by": {
            "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "description": "Additional freeform notes submitted by the company as part of the dispute evidence.",
            "example": "Customer used the product for 3 months before disputing.",
            "type": [
              "string",
              "null"
            ]
          },
          "payment": {
            "description": "The original payment that was disputed.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_instrument": {
                "description": "The instrument this payment was made with, shaped for display: the method type, a buyer-facing name, the standard icon set, and the card facts when it was a card. Null when the receipt names no payment method.",
                "properties": {
                  "display_name": {
                    "description": "Buyer-facing instrument name — \"Visa •••• 4242\" when the card surfaced, else the method's own name (\"Klarna\").",
                    "type": "string"
                  },
                  "icons": {
                    "description": "The standard icon set: square and card shapes, each in light and dark colorways.",
                    "properties": {
                      "square": {
                        "description": "The square tile (32x32).",
                        "properties": {
                          "dark": {
                            "description": "The colorway for dark surfaces.",
                            "properties": {
                              "svg": {
                                "description": "The vector file. Prefer this everywhere SVG renders.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "svg"
                            ],
                            "type": "object"
                          },
                          "light": {
                            "description": "The colorway for light surfaces.",
                            "properties": {
                              "svg": {
                                "description": "The vector file. Prefer this everywhere SVG renders.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "svg"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "light",
                          "dark"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "square"
                    ],
                    "type": "object"
                  },
                  "installment_count": {
                    "description": "Installment methods only: how many payments the charge splits into. Data, not copy — compose and translate the label client-side.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "payment_method_type": {
                    "description": "The payment method type identifier, e.g. `card`, `klarna`, `apple_pay`.",
                    "type": "string"
                  }
                },
                "required": [
                  "payment_method_type",
                  "display_name",
                  "installment_count",
                  "icons"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "properties": {
                  "email": {
                    "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                    "example": "john.doe@example.com",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's display name shown on their public profile.",
                    "example": "John Doe",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The user's unique username shown on their public profile.",
                    "example": "johndoe42",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "payment_instrument",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with the disputed payment. Null if the dispute is not linked to a specific product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product_description": {
            "description": "A description of the product or service provided, submitted as dispute evidence.",
            "example": "Monthly subscription to premium analytics dashboard.",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "description": "A human-readable reason for the dispute.",
            "example": "Product Not Received",
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "description": "The card network reason code for the dispute. Null when the payment processor did not provide one.",
            "example": "10.4",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_policy_attachment": {
            "description": "The refund policy document uploaded as dispute evidence. Null if no refund policy has been provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "refund_policy_disclosure": {
            "description": "A text disclosure describing the company's refund policy, submitted as dispute evidence.",
            "example": "Refunds available within 14 days of purchase.",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_refusal_explanation": {
            "description": "An explanation from the company for why a refund was refused, submitted as dispute evidence.",
            "example": "The customer exceeded the refund window by 60 days.",
            "type": [
              "string",
              "null"
            ]
          },
          "service_date": {
            "description": "The date when the product or service was delivered to the customer, submitted as dispute evidence.",
            "example": "2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatuses",
            "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
          },
          "uncategorized_attachment": {
            "description": "An additional attachment that does not fit into the standard evidence categories. Null if not provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "visa_rdr": {
            "description": "Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "editable",
          "created_at",
          "visa_rdr",
          "needs_response_by",
          "reason",
          "reason_code",
          "plan",
          "product",
          "company",
          "payment",
          "access_activity_log",
          "billing_address",
          "cancellation_policy_disclosure",
          "customer_email_address",
          "customer_name",
          "notes",
          "product_description",
          "refund_policy_disclosure",
          "refund_refusal_explanation",
          "service_date",
          "cancellation_policy_attachment",
          "customer_communication_attachment",
          "refund_policy_attachment",
          "uncategorized_attachment"
        ],
        "type": "object"
      },
      "DisputeAlert": {
        "description": "A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.",
        "properties": {
          "alert_type": {
            "$ref": "#/components/schemas/DisputeAlertTypes",
            "description": "The type of the dispute alert."
          },
          "amount": {
            "description": "The alerted amount in the specified currency.",
            "example": 6.9,
            "type": "number"
          },
          "charge_for_alert": {
            "description": "Whether this alert incurs a charge.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The time the dispute alert was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the alerted amount."
          },
          "dispute": {
            "description": "The dispute associated with the dispute alert.",
            "properties": {
              "amount": {
                "description": "The disputed amount in the specified currency, formatted as a decimal.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the dispute was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for the disputed amount."
              },
              "id": {
                "description": "The unique identifier for the dispute.",
                "example": "dspt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "reason": {
                "description": "A human-readable reason for the dispute.",
                "example": "Product Not Received",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/DisputeStatuses",
                "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
              }
            },
            "required": [
              "id",
              "amount",
              "currency",
              "status",
              "reason",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier of the dispute alert.",
            "example": "dspa_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with the dispute alert.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "properties": {
                  "email": {
                    "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                    "example": "john.doe@example.com",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's display name shown on their public profile.",
                    "example": "John Doe",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The user's unique username shown on their public profile.",
                    "example": "johndoe42",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "transaction_date": {
            "description": "The date of the original transaction.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "alert_type",
          "amount",
          "currency",
          "created_at",
          "transaction_date",
          "charge_for_alert",
          "payment",
          "dispute"
        ],
        "type": "object"
      },
      "DisputeAlertListItem": {
        "description": "A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.",
        "properties": {
          "alert_type": {
            "$ref": "#/components/schemas/DisputeAlertTypes",
            "description": "The type of the dispute alert."
          },
          "amount": {
            "description": "The alerted amount in the specified currency.",
            "example": 6.9,
            "type": "number"
          },
          "charge_for_alert": {
            "description": "Whether this alert incurs a charge.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The time the dispute alert was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the alerted amount."
          },
          "dispute": {
            "description": "The dispute associated with the dispute alert.",
            "properties": {
              "id": {
                "description": "The unique identifier for the dispute.",
                "example": "dspt_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier of the dispute alert.",
            "example": "dspa_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with the dispute alert.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "transaction_date": {
            "description": "The date of the original transaction.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "alert_type",
          "amount",
          "currency",
          "created_at",
          "transaction_date",
          "charge_for_alert",
          "payment",
          "dispute"
        ],
        "type": "object"
      },
      "DisputeAlertTypes": {
        "description": "The type of dispute alert.",
        "enum": [
          "dispute",
          "dispute_rdr",
          "fraud"
        ],
        "type": "string"
      },
      "DisputeListItem": {
        "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
        "properties": {
          "amount": {
            "description": "The disputed amount in the specified currency, formatted as a decimal.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company that the dispute was filed against.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the dispute was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the disputed amount."
          },
          "editable": {
            "description": "Whether the dispute evidence can still be edited and submitted.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the dispute.",
            "example": "dspt_xxxxxxxxxxxxx",
            "type": "string"
          },
          "needs_response_by": {
            "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment": {
            "description": "The original payment that was disputed.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_instrument": {
                "description": "The instrument this payment was made with, shaped for display: the method type, a buyer-facing name, the standard icon set, and the card facts when it was a card. Null when the receipt names no payment method.",
                "properties": {
                  "display_name": {
                    "description": "Buyer-facing instrument name — \"Visa •••• 4242\" when the card surfaced, else the method's own name (\"Klarna\").",
                    "type": "string"
                  },
                  "icons": {
                    "description": "The standard icon set: square and card shapes, each in light and dark colorways.",
                    "properties": {
                      "square": {
                        "description": "The square tile (32x32).",
                        "properties": {
                          "dark": {
                            "description": "The colorway for dark surfaces.",
                            "properties": {
                              "svg": {
                                "description": "The vector file. Prefer this everywhere SVG renders.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "svg"
                            ],
                            "type": "object"
                          },
                          "light": {
                            "description": "The colorway for light surfaces.",
                            "properties": {
                              "svg": {
                                "description": "The vector file. Prefer this everywhere SVG renders.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "svg"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "light",
                          "dark"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "square"
                    ],
                    "type": "object"
                  },
                  "installment_count": {
                    "description": "Installment methods only: how many payments the charge splits into. Data, not copy — compose and translate the label client-side.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "payment_method_type": {
                    "description": "The payment method type identifier, e.g. `card`, `klarna`, `apple_pay`.",
                    "type": "string"
                  }
                },
                "required": [
                  "payment_method_type",
                  "display_name",
                  "installment_count",
                  "icons"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "payment_instrument"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with the disputed payment. Null if the dispute is not linked to a specific product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "reason": {
            "description": "A human-readable reason for the dispute.",
            "example": "Product Not Received",
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "description": "The card network reason code for the dispute. Null when the payment processor did not provide one.",
            "example": "10.4",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatuses",
            "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
          },
          "visa_rdr": {
            "description": "Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "editable",
          "created_at",
          "visa_rdr",
          "needs_response_by",
          "reason",
          "reason_code",
          "plan",
          "product",
          "company",
          "payment"
        ],
        "type": "object"
      },
      "DisputeStatuses": {
        "description": "The possible statuses of a dispute",
        "enum": [
          "warning_needs_response",
          "warning_under_review",
          "warning_closed",
          "needs_response",
          "under_review",
          "won",
          "lost",
          "closed",
          "other"
        ],
        "type": "string"
      },
      "DmChannel": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "created_at": {
            "description": "The time the entity was created (in milliseconds since Unix epoch)",
            "example": "123.45",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "name",
          "last_message_at"
        ],
        "type": "object"
      },
      "DmChannelListItem": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "created_at": {
            "description": "The time the entity was created (in milliseconds since Unix epoch)",
            "example": "123.45",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "name",
          "last_message_at"
        ],
        "type": "object"
      },
      "DmMember": {
        "description": "A user's membership record in a messaging channel, including notification preferences and read state.",
        "properties": {
          "channel_id": {
            "description": "The unique identifier of the messaging channel this membership belongs to.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_viewed_at": {
            "description": "The timestamp when this member last viewed the channel, as a Unix timestamp in milliseconds. Null if the member has never viewed the channel.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "notification_preference": {
            "$ref": "#/components/schemas/DmsFeedMemberNotificationPreferences",
            "description": "The notification level for this channel: all, mentions, or none."
          },
          "status": {
            "$ref": "#/components/schemas/DmsFeedMemberStatuses",
            "description": "The current state of this membership: requested, accepted, hidden, closed, or archived."
          },
          "user_id": {
            "description": "The unique identifier of the user who holds this channel membership.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "channel_id",
          "status",
          "last_viewed_at",
          "notification_preference"
        ],
        "type": "object"
      },
      "DmMemberListItem": {
        "description": "A user's membership record in a messaging channel, including notification preferences and read state.",
        "properties": {
          "channel_id": {
            "description": "The unique identifier of the messaging channel this membership belongs to.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_viewed_at": {
            "description": "The timestamp when this member last viewed the channel, as a Unix timestamp in milliseconds. Null if the member has never viewed the channel.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DmsFeedMemberStatuses",
            "description": "The current state of this membership: requested, accepted, hidden, closed, or archived."
          },
          "user_id": {
            "description": "The unique identifier of the user who holds this channel membership.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "channel_id",
          "status",
          "last_viewed_at"
        ],
        "type": "object"
      },
      "DmsFeedMemberNotificationPreferences": {
        "description": "The notification preferences for a DMs feed member",
        "enum": [
          "all",
          "mentions",
          "none"
        ],
        "type": "string"
      },
      "DmsFeedMemberStatuses": {
        "description": " The statuses of a DMs feed member",
        "enum": [
          "requested",
          "accepted",
          "hidden",
          "closed",
          "archived"
        ],
        "type": "string"
      },
      "DmsPostTypes": {
        "description": "The types of post",
        "enum": [
          "regular",
          "system",
          "automated"
        ],
        "type": "string"
      },
      "EmbedTypes": {
        "description": "The type of embed for a lesson",
        "enum": [
          "youtube",
          "loom"
        ],
        "type": "string"
      },
      "EntriesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at"
        ],
        "type": "string"
      },
      "Entry": {
        "description": "An entry represents a user's signup for a waitlisted plan.",
        "properties": {
          "created_at": {
            "description": "The datetime the entry was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_field_responses": {
            "description": "The list of responses collected from the user when submitting their waitlist entry.",
            "items": {
              "description": "The response from a custom field on checkout",
              "properties": {
                "answer": {
                  "description": "The response a user gave to the specific question or field.",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the custom field response.",
                  "example": "cfrp_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "question": {
                  "description": "The question asked by the custom field",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "question",
                "answer"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entry.",
            "example": "entry_xxxxxxxxxxxx",
            "type": "string"
          },
          "plan": {
            "description": "The waitlisted plan that this entry is a signup for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with this entry's waitlisted plan. Null if the plan is not tied to a product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus",
            "description": "The current status of the waitlist entry (e.g., drafted, pending, approved, denied)."
          },
          "user": {
            "description": "The user who submitted this waitlist entry.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "plan",
          "product",
          "status",
          "user",
          "created_at",
          "custom_field_responses"
        ],
        "type": "object"
      },
      "EntryListItem": {
        "description": "An entry represents a user's signup for a waitlisted plan.",
        "properties": {
          "created_at": {
            "description": "The datetime the entry was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entry.",
            "example": "entry_xxxxxxxxxxxx",
            "type": "string"
          },
          "plan": {
            "description": "The waitlisted plan that this entry is a signup for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with this entry's waitlisted plan. Null if the plan is not tied to a product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus",
            "description": "The current status of the waitlist entry (e.g., drafted, pending, approved, denied)."
          },
          "user": {
            "description": "The user who submitted this waitlist entry.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "plan",
          "product",
          "status",
          "user",
          "created_at"
        ],
        "type": "object"
      },
      "EntryStatus": {
        "description": "The status of an entry to a waitlist.",
        "enum": [
          "drafted",
          "pending",
          "approved",
          "denied",
          "any"
        ],
        "type": "string"
      },
      "Experience": {
        "description": "An experience is a feature or content module within a product, such as a chat, course, or custom app.",
        "properties": {
          "app": {
            "description": "The app that powers this experience, defining its interface and behavior.",
            "properties": {
              "icon": {
                "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
                "properties": {
                  "url": {
                    "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                    "example": "https://media.whop.com/abc123/optimized.jpg",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the app.",
                "example": "app_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
                "example": "Courses",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "icon"
            ],
            "type": "object"
          },
          "company": {
            "description": "The company that owns this experience.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the experience was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the experience.",
            "example": "exp_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "image": {
            "description": "The custom logo image for this experience. Null if no custom logo has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "is_public": {
            "description": "Whether this experience is publicly visible to all users, including those without a membership.",
            "type": "boolean"
          },
          "name": {
            "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
            "example": "Trading Signals Chat",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this experience within its section. Lower values appear first. Null if no position has been set.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "products": {
            "description": "The list of products this experience is attached to, which determines which customers have access. Empty if the experience is only visible to authorized company team members.",
            "items": {
              "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the product.",
                  "example": "prod_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "route": {
                  "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                  "example": "pickaxe-analytics",
                  "type": "string"
                },
                "title": {
                  "description": "The display name of the product shown to customers on the product page and in search results.",
                  "example": "Pickaxe Analytics",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "route",
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "is_public",
          "created_at",
          "app",
          "image",
          "company",
          "products"
        ],
        "type": "object"
      },
      "ExperienceAccessLevels": {
        "description": "The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).",
        "enum": [
          "public",
          "private"
        ],
        "type": "string"
      },
      "ExperienceListItem": {
        "description": "An experience is a feature or content module within a product, such as a chat, course, or custom app.",
        "properties": {
          "app": {
            "description": "The app that powers this experience, defining its interface and behavior.",
            "properties": {
              "icon": {
                "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
                "properties": {
                  "url": {
                    "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                    "example": "https://media.whop.com/abc123/optimized.jpg",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the app.",
                "example": "app_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
                "example": "Courses",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "icon"
            ],
            "type": "object"
          },
          "company": {
            "description": "The company that owns this experience.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the experience was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the experience.",
            "example": "exp_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "image": {
            "description": "The custom logo image for this experience. Null if no custom logo has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "is_public": {
            "description": "Whether this experience is publicly visible to all users, including those without a membership.",
            "type": "boolean"
          },
          "name": {
            "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
            "example": "Trading Signals Chat",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this experience within its section. Lower values appear first. Null if no position has been set.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "is_public",
          "created_at",
          "app",
          "image",
          "company"
        ],
        "type": "object"
      },
      "FeeMarkup": {
        "description": "A fee markup configuration that defines additional charges applied to transactions for a platform's connected accounts.",
        "properties": {
          "created_at": {
            "description": "The datetime the fee markup was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "fee_type": {
            "$ref": "#/components/schemas/FeeMarkupTypes",
            "description": "The category of fee this markup applies to."
          },
          "fixed_fee_usd": {
            "description": "A flat fee charged per transaction, in USD. Ranges from 0 to 50. Null if no fixed fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the fee markup.",
            "type": "string"
          },
          "notes": {
            "description": "Internal notes about this fee markup, visible only to administrators. Null if no notes have been added.",
            "example": "Approved by finance team on 2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "percentage_fee": {
            "description": "A percentage-based fee charged per transaction. Ranges from 0 to 25. Null if no percentage fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the fee markup was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "fee_type",
          "percentage_fee",
          "fixed_fee_usd",
          "notes",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "FeeMarkupListItem": {
        "description": "A fee markup configuration that defines additional charges applied to transactions for a platform's connected accounts.",
        "properties": {
          "created_at": {
            "description": "The datetime the fee markup was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "fee_type": {
            "$ref": "#/components/schemas/FeeMarkupTypes",
            "description": "The category of fee this markup applies to."
          },
          "fixed_fee_usd": {
            "description": "A flat fee charged per transaction, in USD. Ranges from 0 to 50. Null if no fixed fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the fee markup.",
            "type": "string"
          },
          "notes": {
            "description": "Internal notes about this fee markup, visible only to administrators. Null if no notes have been added.",
            "example": "Approved by finance team on 2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "percentage_fee": {
            "description": "A percentage-based fee charged per transaction. Ranges from 0 to 25. Null if no percentage fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the fee markup was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "fee_type",
          "percentage_fee",
          "fixed_fee_usd",
          "notes",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "FeeMarkupTypes": {
        "description": "The types of fee markups that can be configured",
        "enum": [
          "crypto_withdrawal_markup",
          "rtp_withdrawal_markup",
          "next_day_bank_withdrawal_markup",
          "bank_wire_withdrawal_markup",
          "digital_wallet_withdrawal_markup",
          "crypto_deposit_markup",
          "bank_deposit_markup"
        ],
        "type": "string"
      },
      "File": {
        "description": "A file that has been uploaded or is pending upload.",
        "properties": {
          "content_type": {
            "description": "The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg).",
            "example": "image/jpeg",
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "description": "The original filename of the uploaded file, including its file extension.",
            "example": "document.pdf",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the file.",
            "example": "file_xxxxxxxxxxxxx",
            "type": "string"
          },
          "size": {
            "description": "The file size in bytes. Null if the file has not finished uploading.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "upload_status": {
            "$ref": "#/components/schemas/UploadStatuses",
            "description": "The current upload status of the file (e.g., pending, ready)."
          },
          "url": {
            "description": "The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading.",
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/FileVisibility",
            "description": "Whether the file is publicly accessible or requires authentication."
          }
        },
        "required": [
          "id",
          "upload_status",
          "filename",
          "content_type",
          "size",
          "url",
          "visibility"
        ],
        "type": "object"
      },
      "FileVisibility": {
        "description": "Controls whether an uploaded file is publicly accessible or requires authentication to access.",
        "enum": [
          "public",
          "private"
        ],
        "type": "string"
      },
      "Forum": {
        "description": "A discussion forum where members can create posts, comment, and react, belonging to an experience.",
        "properties": {
          "email_notification_preference": {
            "$ref": "#/components/schemas/ForumEmailNotificationPreferences",
            "description": "The email notification setting that controls which posts trigger email alerts. One of: all_admin_posts, only_weekly_summary, none."
          },
          "experience": {
            "description": "The parent experience that this forum belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "is_public": {
                "description": "Whether this experience is publicly visible to all users, including those without a membership.",
                "type": "boolean"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "is_public"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "who_can_comment": {
            "$ref": "#/components/schemas/ForumWhoCanCommentTypes",
            "description": "The permission level controlling who can comment on posts. One of: everyone, admins."
          },
          "who_can_post": {
            "$ref": "#/components/schemas/ForumWhoCanPostTypes",
            "description": "The permission level controlling who can create new posts. One of: everyone, admins."
          }
        },
        "required": [
          "id",
          "experience",
          "who_can_post",
          "who_can_comment",
          "email_notification_preference"
        ],
        "type": "object"
      },
      "ForumEmailNotificationPreferences": {
        "description": "Email notification preference option for a forum feed",
        "enum": [
          "all_admin_posts",
          "only_weekly_summary",
          "none"
        ],
        "type": "string"
      },
      "ForumListItem": {
        "description": "A discussion forum where members can create posts, comment, and react, belonging to an experience.",
        "properties": {
          "email_notification_preference": {
            "$ref": "#/components/schemas/ForumEmailNotificationPreferences",
            "description": "The email notification setting that controls which posts trigger email alerts. One of: all_admin_posts, only_weekly_summary, none."
          },
          "experience": {
            "description": "The parent experience that this forum belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "is_public": {
                "description": "Whether this experience is publicly visible to all users, including those without a membership.",
                "type": "boolean"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "is_public"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "who_can_comment": {
            "$ref": "#/components/schemas/ForumWhoCanCommentTypes",
            "description": "The permission level controlling who can comment on posts. One of: everyone, admins."
          },
          "who_can_post": {
            "$ref": "#/components/schemas/ForumWhoCanPostTypes",
            "description": "The permission level controlling who can create new posts. One of: everyone, admins."
          }
        },
        "required": [
          "id",
          "experience",
          "who_can_post",
          "who_can_comment",
          "email_notification_preference"
        ],
        "type": "object"
      },
      "ForumPost": {
        "description": "A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.",
        "properties": {
          "attachments": {
            "description": "All file attachments on this post, such as images, documents, and videos.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "comment_count": {
            "description": "The total number of direct comments on this post.",
            "example": 42,
            "type": "integer"
          },
          "content": {
            "description": "The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.",
            "example": "## My Strategy\n\nHere are the key steps...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The time this post was created, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether this post has been edited after its initial creation.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this post is pinned to the top of the forum feed.",
            "type": "boolean"
          },
          "is_poster_admin": {
            "description": "Whether the author of this post is an admin of the company that owns the forum.",
            "type": "boolean"
          },
          "like_count": {
            "description": "The total number of like reactions this post has received.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "parent_id": {
            "description": "The unique identifier of the parent post. Null if this is a top-level post.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The headline of the forum post. Null if the post has no title.",
            "example": "Weekly Market Analysis - February 2025",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The time this post was last updated, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this forum post.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The total number of times this post has been viewed by users.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "created_at",
          "updated_at",
          "is_edited",
          "is_poster_admin",
          "is_pinned",
          "parent_id",
          "user",
          "attachments",
          "view_count",
          "like_count",
          "comment_count"
        ],
        "type": "object"
      },
      "ForumPostListItem": {
        "description": "A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.",
        "properties": {
          "attachments": {
            "description": "All file attachments on this post, such as images, documents, and videos.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "comment_count": {
            "description": "The total number of direct comments on this post.",
            "example": 42,
            "type": "integer"
          },
          "content": {
            "description": "The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.",
            "example": "## My Strategy\n\nHere are the key steps...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The time this post was created, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether this post has been edited after its initial creation.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this post is pinned to the top of the forum feed.",
            "type": "boolean"
          },
          "is_poster_admin": {
            "description": "Whether the author of this post is an admin of the company that owns the forum.",
            "type": "boolean"
          },
          "like_count": {
            "description": "The total number of like reactions this post has received.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "parent_id": {
            "description": "The unique identifier of the parent post. Null if this is a top-level post.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The headline of the forum post. Null if the post has no title.",
            "example": "Weekly Market Analysis - February 2025",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The time this post was last updated, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this forum post.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The total number of times this post has been viewed by users.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "created_at",
          "updated_at",
          "is_edited",
          "is_poster_admin",
          "is_pinned",
          "parent_id",
          "user",
          "attachments",
          "view_count",
          "like_count",
          "comment_count"
        ],
        "type": "object"
      },
      "ForumPostVisibilityTypes": {
        "description": "The visibility types for forum posts",
        "enum": [
          "members_only",
          "globally_visible"
        ],
        "type": "string"
      },
      "ForumWhoCanCommentTypes": {
        "description": "Who can comment on a forum feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "ForumWhoCanPostTypes": {
        "description": "Who can post on a forum feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "FriendlyReceiptStatus": {
        "description": "The friendly status of a payment. This is a derived status that provides a human-readable summary of the payment state, combining the underlying status and substatus fields.",
        "enum": [
          "succeeded",
          "requires_capture",
          "pending",
          "failed",
          "past_due",
          "canceled",
          "price_too_low",
          "uncollectible",
          "refunded",
          "auto_refunded",
          "partially_refunded",
          "dispute_warning",
          "dispute_needs_response",
          "dispute_warning_needs_response",
          "resolution_needs_response",
          "dispute_under_review",
          "dispute_warning_under_review",
          "resolution_under_review",
          "dispute_won",
          "dispute_warning_closed",
          "resolution_won",
          "dispute_lost",
          "dispute_closed",
          "resolution_lost",
          "drafted",
          "incomplete",
          "unresolved",
          "open_dispute",
          "open_resolution"
        ],
        "type": "string"
      },
      "FutureUsageTypes": {
        "description": "How a payment method will be charged after the buyer leaves — the same vocabulary as a confirmation token's setup_future_usage.",
        "enum": [
          "off_session",
          "on_session"
        ],
        "type": "string"
      },
      "GlobalAffiliateStatuses": {
        "description": "The different statuses of the global affiliate program for a product.",
        "enum": [
          "enabled",
          "disabled"
        ],
        "type": "string"
      },
      "GrantableAuthorizedUserRoles": {
        "description": "System roles accepted by legacy authorized-user mutations",
        "enum": [
          "owner",
          "admin",
          "sales_manager",
          "moderator",
          "advertiser"
        ],
        "type": "string"
      },
      "IdentityProfile": {
        "description": "A consolidated identity or business profile synced from verification provider data.",
        "properties": {
          "business_address": {
            "description": "Registered business address reported by the identity provider. Present on `business` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "Business entity name. Present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "business_structure": {
            "description": "Reported legal structure of a business profile (e.g. `corp`, `llc`). Provider-specific values; present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 country code reported by the identity provider, such as `US` or `GB`. For individuals this is the country of citizenship or residence; for businesses, the country of incorporation.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When the identity profile was first created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "date_of_birth": {
            "description": "ISO date (`YYYY-MM-DD`) reported by the identity provider. Present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "description": "Individual's first name.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The tag of the identity profile (idpf_xxx).",
            "example": "idpf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_name": {
            "description": "Individual's last name.",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_companies": {
            "description": "The companies this identity profile is currently linked to. Only populated for direct Whop user sessions; always empty when authenticated via API key, app, or OAuth scope (a single identity can be linked to companies the calling platform is not entitled to see).",
            "items": {
              "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the company.",
                  "example": "biz_xxxxxxxxxxxxxx",
                  "type": "string"
                },
                "title": {
                  "description": "The display name of the company shown to customers.",
                  "example": "Pickaxe",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "payout_status": {
            "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses",
            "description": "Progress of payout-account setup for this profile, independent of holds. `connected` means onboarding is complete; a `connected` status paired with `payouts_enabled: false` indicates an active account restriction rather than incomplete setup."
          },
          "payouts_enabled": {
            "description": "Whether this profile can receive payouts right now. True only when payout onboarding is complete and no payout holds are active on the linked account. Treat this as the single source of truth for payout readiness.",
            "type": "boolean"
          },
          "personal_address": {
            "description": "Residential address reported by the identity provider. Present on `individual` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "Phone number reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "profile_type": {
            "description": "Whether this is an 'individual' or 'business' profile.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IdentityProfileStatuses",
            "description": "Derived verification status across all linked verifications. Returns `action_required` whenever the profile has an open request for information (whether a verification, payout, or audit RFI) — i.e. the merchant must submit something before it is in good standing."
          },
          "updated_at": {
            "description": "When the identity profile was last synced from a verification.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verifications": {
            "description": "All verification attempts attached to this identity profile, ordered most-recent first.",
            "items": {
              "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
              "properties": {
                "created_at": {
                  "description": "When the verification record was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The numeric id of the verification record.",
                  "example": "verf_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "last_error_code": {
                  "description": "The most recent error code returned during verification. Null if no error has occurred.",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VerificationErrorCodes"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error_reason": {
                  "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                  "example": "Document image was too blurry to read.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "session_url": {
                  "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                  "example": "https://verify.stripe.com/session/abc123",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/VerificationStatuses",
                  "description": "The current status of this verification session."
                }
              },
              "required": [
                "id",
                "status",
                "session_url",
                "last_error_code",
                "last_error_reason",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "profile_type",
          "status",
          "payout_status",
          "payouts_enabled",
          "first_name",
          "last_name",
          "date_of_birth",
          "email",
          "phone",
          "personal_address",
          "business_name",
          "business_structure",
          "business_address",
          "country",
          "linked_companies",
          "verifications",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "IdentityProfileKinds": {
        "description": "The kind of identity profile (individual vs business).",
        "enum": [
          "individual",
          "business"
        ],
        "type": "string"
      },
      "IdentityProfileListItem": {
        "description": "A consolidated identity or business profile synced from verification provider data.",
        "properties": {
          "business_address": {
            "description": "Registered business address reported by the identity provider. Present on `business` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "Business entity name. Present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "business_structure": {
            "description": "Reported legal structure of a business profile (e.g. `corp`, `llc`). Provider-specific values; present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 country code reported by the identity provider, such as `US` or `GB`. For individuals this is the country of citizenship or residence; for businesses, the country of incorporation.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When the identity profile was first created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "date_of_birth": {
            "description": "ISO date (`YYYY-MM-DD`) reported by the identity provider. Present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "description": "Individual's first name.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The tag of the identity profile (idpf_xxx).",
            "example": "idpf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_name": {
            "description": "Individual's last name.",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_companies": {
            "description": "The companies this identity profile is currently linked to. Only populated for direct Whop user sessions; always empty when authenticated via API key, app, or OAuth scope (a single identity can be linked to companies the calling platform is not entitled to see).",
            "items": {
              "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the company.",
                  "example": "biz_xxxxxxxxxxxxxx",
                  "type": "string"
                },
                "title": {
                  "description": "The display name of the company shown to customers.",
                  "example": "Pickaxe",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "payout_status": {
            "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses",
            "description": "Progress of payout-account setup for this profile, independent of holds. `connected` means onboarding is complete; a `connected` status paired with `payouts_enabled: false` indicates an active account restriction rather than incomplete setup."
          },
          "payouts_enabled": {
            "description": "Whether this profile can receive payouts right now. True only when payout onboarding is complete and no payout holds are active on the linked account. Treat this as the single source of truth for payout readiness.",
            "type": "boolean"
          },
          "personal_address": {
            "description": "Residential address reported by the identity provider. Present on `individual` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "Phone number reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "profile_type": {
            "description": "Whether this is an 'individual' or 'business' profile.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IdentityProfileStatuses",
            "description": "Derived verification status across all linked verifications. Returns `action_required` whenever the profile has an open request for information (whether a verification, payout, or audit RFI) — i.e. the merchant must submit something before it is in good standing."
          },
          "updated_at": {
            "description": "When the identity profile was last synced from a verification.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verifications": {
            "description": "All verification attempts attached to this identity profile, ordered most-recent first.",
            "items": {
              "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
              "properties": {
                "created_at": {
                  "description": "When the verification record was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The numeric id of the verification record.",
                  "example": "verf_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "last_error_code": {
                  "description": "The most recent error code returned during verification. Null if no error has occurred.",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VerificationErrorCodes"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error_reason": {
                  "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                  "example": "Document image was too blurry to read.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "session_url": {
                  "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                  "example": "https://verify.stripe.com/session/abc123",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/VerificationStatuses",
                  "description": "The current status of this verification session."
                }
              },
              "required": [
                "id",
                "status",
                "session_url",
                "last_error_code",
                "last_error_reason",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "profile_type",
          "status",
          "payout_status",
          "payouts_enabled",
          "first_name",
          "last_name",
          "date_of_birth",
          "email",
          "phone",
          "personal_address",
          "business_name",
          "business_structure",
          "business_address",
          "country",
          "linked_companies",
          "verifications",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "IdentityProfileStatuses": {
        "description": "Derived verification status for an identity profile.",
        "enum": [
          "not_started",
          "pending",
          "manual_review",
          "approved",
          "rejected",
          "action_required"
        ],
        "type": "string"
      },
      "Invoice": {
        "description": "An invoice represents an itemized bill sent by a company to a customer for a specific product and plan, tracking the amount owed, due date, and payment status.",
        "properties": {
          "automatically_finalizes_at": {
            "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email at the specified time.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "charge_buyer_fee": {
            "description": "Whether the invoice includes a buyer processing fee on top of the plan price.",
            "type": "boolean"
          },
          "collection_method": {
            "$ref": "#/components/schemas/InvoiceCollectionMethods",
            "description": "The method used to collect payment for this invoice, such as automatic charging or manual payment."
          },
          "company": {
            "description": "The company that issued this invoice.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the invoice was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "current_plan": {
            "description": "The plan that this invoice charges for.",
            "properties": {
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "description": {
                "description": "A text description of the plan visible to customers. Maximum 1000 characters. Null if no description is set.",
                "example": "Monthly access to all premium analytics dashboards and data exports.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "formatted_price": {
                "description": "The formatted price (including currency) for the plan.",
                "example": "$10.00",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "formatted_price",
              "currency",
              "description"
            ],
            "type": "object"
          },
          "customer_name": {
            "description": "The full name of the customer this invoice is addressed to. Null if no name is on file.",
            "example": "Jane Doe",
            "type": [
              "string",
              "null"
            ]
          },
          "due_date": {
            "description": "The deadline by which payment is expected. Null if the invoice is collected automatically.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "email_address": {
            "description": "The email address of the customer this invoice is addressed to. Null if no email is on file.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_invoice_token": {
            "description": "A signed token that allows fetching invoice data publicly without authentication.",
            "example": "eyJhbGciOiJIUzI1NiJ9...",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the invoice.",
            "example": "inv_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "line_items": {
            "description": "Optional line items that break down the invoice total into individual charges.",
            "items": {
              "description": "A line item on an invoice, representing a single charge with a label, quantity, and unit price.",
              "properties": {
                "label": {
                  "description": "The label or description for this line item.",
                  "example": "Platform subscription",
                  "type": "string"
                },
                "position": {
                  "description": "The display order of this line item within the invoice.",
                  "example": 42,
                  "type": "integer"
                },
                "quantity": {
                  "description": "The quantity of this line item.",
                  "example": 6.9,
                  "type": "number"
                },
                "total": {
                  "description": "The computed total for this line item (quantity * unit_price).",
                  "example": 6.9,
                  "type": "number"
                },
                "unit_price": {
                  "description": "The unit price for this line item. Negative for a credit or deduction.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "label",
                "quantity",
                "unit_price",
                "total",
                "position"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "mailing_address": {
            "description": "The billing/mailing address associated with this invoice, if one was provided at creation time.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "description": "The phone number of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country",
              "phone"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "member": {
            "description": "The member that the invoice was created for. Null when the invoice is addressed to an email address with no member record behind it.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "number": {
            "description": "The sequential invoice number for display purposes.",
            "example": "#0001",
            "type": "string"
          },
          "pay_online_url": {
            "description": "The checkout URL where the customer can pay this invoice online, with their email address pre-filled and locked.",
            "type": [
              "string",
              "null"
            ]
          },
          "payment": {
            "description": "The payment that settled this invoice. Null while the invoice is unpaid, when the invoice was marked paid manually, and on a subscription renewal invoice, where the settling payment cannot yet be identified.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_processing": {
            "description": "Whether a payment on this invoice is still clearing. True while a delayed payment method such as ACH or SEPA settles, during which the invoice stays open and is not marked past due.",
            "type": "boolean"
          },
          "product": {
            "description": "The product that this invoice was generated for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatuses",
            "description": "The current payment status of the invoice, such as draft, open, paid, or void."
          },
          "subscription_billing_anchor_at": {
            "description": "The date that defines when the subscription billing cycle starts. When set on a renewal plan invoice, all future billing periods anchor to this date.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the invoice was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user this invoice is addressed to. Null if the user account has been removed.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "payment_processing",
          "number",
          "due_date",
          "email_address",
          "fetch_invoice_token",
          "line_items",
          "updated_at",
          "company",
          "user",
          "member",
          "payment",
          "automatically_finalizes_at",
          "subscription_billing_anchor_at",
          "collection_method",
          "charge_buyer_fee",
          "customer_name",
          "pay_online_url",
          "current_plan",
          "product",
          "mailing_address"
        ],
        "type": "object"
      },
      "InvoiceCollectionMethods": {
        "description": "The method of collection for an invoice.",
        "enum": [
          "send_invoice",
          "charge_automatically"
        ],
        "type": "string"
      },
      "InvoiceListItem": {
        "description": "An invoice represents an itemized bill sent by a company to a customer for a specific product and plan, tracking the amount owed, due date, and payment status.",
        "properties": {
          "created_at": {
            "description": "The datetime the invoice was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "current_plan": {
            "description": "The plan that this invoice charges for.",
            "properties": {
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "formatted_price": {
                "description": "The formatted price (including currency) for the plan.",
                "example": "$10.00",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "formatted_price",
              "currency"
            ],
            "type": "object"
          },
          "due_date": {
            "description": "The deadline by which payment is expected. Null if the invoice is collected automatically.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "email_address": {
            "description": "The email address of the customer this invoice is addressed to. Null if no email is on file.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_invoice_token": {
            "description": "A signed token that allows fetching invoice data publicly without authentication.",
            "example": "eyJhbGciOiJIUzI1NiJ9...",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the invoice.",
            "example": "inv_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "line_items": {
            "description": "Optional line items that break down the invoice total into individual charges.",
            "items": {
              "description": "A line item on an invoice, representing a single charge with a label, quantity, and unit price.",
              "properties": {
                "label": {
                  "description": "The label or description for this line item.",
                  "example": "Platform subscription",
                  "type": "string"
                },
                "position": {
                  "description": "The display order of this line item within the invoice.",
                  "example": 42,
                  "type": "integer"
                },
                "quantity": {
                  "description": "The quantity of this line item.",
                  "example": 6.9,
                  "type": "number"
                },
                "total": {
                  "description": "The computed total for this line item (quantity * unit_price).",
                  "example": 6.9,
                  "type": "number"
                },
                "unit_price": {
                  "description": "The unit price for this line item. Negative for a credit or deduction.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "label",
                "quantity",
                "unit_price",
                "total",
                "position"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "number": {
            "description": "The sequential invoice number for display purposes.",
            "example": "#0001",
            "type": "string"
          },
          "payment_processing": {
            "description": "Whether a payment on this invoice is still clearing. True while a delayed payment method such as ACH or SEPA settles, during which the invoice stays open and is not marked past due.",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatuses",
            "description": "The current payment status of the invoice, such as draft, open, paid, or void."
          },
          "user": {
            "description": "The user this invoice is addressed to. Null if the user account has been removed.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "payment_processing",
          "number",
          "due_date",
          "email_address",
          "fetch_invoice_token",
          "current_plan",
          "line_items",
          "user"
        ],
        "type": "object"
      },
      "InvoiceStatuses": {
        "description": "The different statuses an invoice can be in",
        "enum": [
          "draft",
          "open",
          "paid",
          "past_due",
          "uncollectible",
          "void"
        ],
        "type": "string"
      },
      "InvoicesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "due_date"
        ],
        "type": "string"
      },
      "Languages": {
        "description": "The available languages for a course",
        "enum": [
          "en",
          "es",
          "it",
          "pt",
          "de",
          "fr",
          "pl",
          "ru",
          "nl",
          "ca",
          "tr",
          "sv",
          "uk",
          "no",
          "fi",
          "sk",
          "el",
          "cs",
          "hr",
          "da",
          "ro",
          "bg"
        ],
        "type": "string"
      },
      "Lead": {
        "description": "A prospective customer who has expressed interest in a company or product but has not yet purchased.",
        "properties": {
          "created_at": {
            "description": "The datetime the lead was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lead.",
            "example": "lead_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member record if this lead has converted into a paying customer. Null if the lead has not converted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this lead. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product the lead expressed interest in. Null if the lead is not associated with a specific product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "referrer": {
            "description": "The URL of the page that referred this lead to the company. Null if no referrer was captured.",
            "example": "https://twitter.com/whabormarket",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the lead was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account associated with this lead.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "referrer",
          "metadata",
          "user",
          "product",
          "member"
        ],
        "type": "object"
      },
      "LeadListItem": {
        "description": "A prospective customer who has expressed interest in a company or product but has not yet purchased.",
        "properties": {
          "created_at": {
            "description": "The datetime the lead was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lead.",
            "example": "lead_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member record if this lead has converted into a paying customer. Null if the lead has not converted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this lead. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product the lead expressed interest in. Null if the lead is not associated with a specific product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "referrer": {
            "description": "The URL of the page that referred this lead to the company. Null if no referrer was captured.",
            "example": "https://twitter.com/whabormarket",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the lead was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account associated with this lead.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "referrer",
          "metadata",
          "user",
          "product",
          "member"
        ],
        "type": "object"
      },
      "LedgerAccount": {
        "description": "A ledger account represents a financial account on Whop that can hold many balances.",
        "properties": {
          "balances": {
            "description": "The balances associated with the account.",
            "items": {
              "description": "A cached balance for a LedgerAccount in respect to a currency.",
              "properties": {
                "balance": {
                  "description": "The amount of the balance.",
                  "example": 6.9,
                  "type": "number"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The currency of the balance."
                },
                "pending_balance": {
                  "description": "The amount of the balance that is pending.",
                  "example": 6.9,
                  "type": "number"
                },
                "reserve_balance": {
                  "description": "The amount of the balance that is reserved.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "balance",
                "currency",
                "pending_balance",
                "reserve_balance"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the ledger account.",
            "example": "ldgr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "ledger_type": {
            "$ref": "#/components/schemas/LedgerTypes",
            "description": "The type of ledger account."
          },
          "owner": {
            "description": "The owner of the ledger account.",
            "discriminator": {
              "propertyName": "typename"
            },
            "oneOf": [
              {
                "description": "A user account on Whop. Contains profile information, identity details, and social connections.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's display name shown on their public profile.",
                    "example": "John Doe",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "typename": {
                    "const": "User",
                    "description": "The typename of this object",
                    "type": "string"
                  },
                  "username": {
                    "description": "The user's unique username shown on their public profile.",
                    "example": "johndoe42",
                    "type": "string"
                  }
                },
                "required": [
                  "typename",
                  "id",
                  "name",
                  "username"
                ],
                "title": "User",
                "type": [
                  "object",
                  "null"
                ]
              },
              {
                "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "route": {
                    "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                    "example": "pickaxe",
                    "type": "string"
                  },
                  "title": {
                    "description": "The display name of the company shown to customers.",
                    "example": "Pickaxe",
                    "type": "string"
                  },
                  "typename": {
                    "const": "Company",
                    "description": "The typename of this object",
                    "type": "string"
                  }
                },
                "required": [
                  "typename",
                  "id",
                  "route",
                  "title"
                ],
                "title": "Company",
                "type": [
                  "object",
                  "null"
                ]
              }
            ],
            "type": "object"
          },
          "payments_approval_status": {
            "description": "The status of payments approval for the ledger account.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentsApprovalStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "payout_account_details": {
            "description": "The payout account associated with the LedgerAccount, if any.",
            "properties": {
              "address": {
                "description": "The physical address associated with this payout account",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "line1",
                  "line2",
                  "city",
                  "postal_code",
                  "state",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "business_name": {
                "description": "The company's legal name",
                "type": [
                  "string",
                  "null"
                ]
              },
              "business_representative": {
                "description": "The business representative for this payout account",
                "properties": {
                  "date_of_birth": {
                    "description": "The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "first_name": {
                    "description": "The first name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last_name": {
                    "description": "The last name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "middle_name": {
                    "description": "The middle name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "date_of_birth",
                  "first_name",
                  "middle_name",
                  "last_name"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "email": {
                "description": "The email address of the representative",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payout account.",
                "example": "poact_xxxxxxxxxxxx",
                "type": "string"
              },
              "latest_verification": {
                "description": "The latest verification for the connected account.",
                "properties": {
                  "id": {
                    "description": "The numeric id of the verification record.",
                    "example": "verf_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "last_error_code": {
                    "description": "The most recent error code returned during verification. Null if no error has occurred.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/VerificationErrorCodes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error_reason": {
                    "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                    "example": "Document image was too blurry to read.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "$ref": "#/components/schemas/VerificationStatuses",
                    "description": "The current status of this verification session."
                  }
                },
                "required": [
                  "id",
                  "status",
                  "last_error_code",
                  "last_error_reason"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "phone": {
                "description": "The business representative's phone",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "description": "The granular calculated status of the payout account reflecting its current KYC and payout readiness state.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "status",
              "business_name",
              "phone",
              "email",
              "business_representative",
              "address",
              "latest_verification"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payout_quote_required": {
            "description": "Whether a payout from this account must be confirmed against a provider-backed quote first. When true, create a quote with POST /payouts/quotes and send its quote_token when creating the payout.",
            "type": "boolean"
          },
          "settlement_time_at": {
            "description": "The settlement batch most recently posted to this account's available balance, at midnight UTC. Every payment settling in that batch carries the same `settlement_time_at`.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "transfer_fee": {
            "description": "The fee for transfers, if applicable.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "treasury_balance": {
            "description": "The balance cache associated with the account by currency.",
            "properties": {
              "balance": {
                "description": "The amount of the balance.",
                "example": 6.9,
                "type": "number"
              },
              "balance_usd": {
                "description": "The balance converted to USD.",
                "example": 6.9,
                "type": "number"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the balance."
              },
              "pending_balance": {
                "description": "The amount of the balance that is pending.",
                "example": 6.9,
                "type": "number"
              },
              "reserve_balance": {
                "description": "The amount of the balance that is reserved.",
                "example": 6.9,
                "type": "number"
              },
              "total_withdrawable_balance": {
                "description": "The amount of the balance that is withdrawable.",
                "example": 6.9,
                "type": "number"
              }
            },
            "required": [
              "balance",
              "balance_usd",
              "currency",
              "pending_balance",
              "reserve_balance",
              "total_withdrawable_balance"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "settlement_time_at",
          "balances",
          "treasury_balance",
          "transfer_fee",
          "payout_account_details",
          "payments_approval_status",
          "ledger_type",
          "payout_quote_required",
          "owner"
        ],
        "type": "object"
      },
      "LedgerTypes": {
        "description": "The types of ledgers that can be created.",
        "enum": [
          "primary",
          "pool"
        ],
        "type": "string"
      },
      "LessonTypes": {
        "description": "The available types for a lesson",
        "enum": [
          "text",
          "video",
          "pdf",
          "multi",
          "quiz",
          "knowledge_check"
        ],
        "type": "string"
      },
      "LessonVisibilities": {
        "description": "The available visibilities for a lesson. Determines how / whether a lesson is visible to users.",
        "enum": [
          "visible",
          "hidden"
        ],
        "type": "string"
      },
      "MarketplaceStatuses": {
        "description": "The available marketplace statuses to choose from.",
        "enum": [
          "not_available",
          "pending_review",
          "live_marketplace"
        ],
        "type": "string"
      },
      "Member": {
        "description": "A member represents a user's relationship with a company on Whop, including their access level, status, and spending history.",
        "properties": {
          "access_level": {
            "$ref": "#/components/schemas/AccessLevel",
            "description": "The member's content access level. `admin` means their team role grants administrative content access, `customer` means they hold a valid product membership, and `no_access` means they cannot access company content."
          },
          "company": {
            "description": "The company for the member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "company_token_balance": {
            "description": "The member's token balance for this company. Computed live from the ledger, not from a cache.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the company member was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the company member.",
            "type": "string"
          },
          "joined_at": {
            "description": "When the member joined the company",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "most_recent_action": {
            "description": "The most recent action the member has taken.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              {
                "type": "null"
              }
            ]
          },
          "most_recent_action_at": {
            "description": "The time for the most recent action, if applicable.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "The phone number for the member, if available.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MemberStatuses",
            "description": "The status of the member"
          },
          "updated_at": {
            "description": "The datetime the company member was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total_spent": {
            "description": "How much money this customer has spent on the company's products and plans",
            "example": 6.9,
            "type": "number"
          },
          "user": {
            "description": "The user for this member, if any.",
            "properties": {
              "email": {
                "description": "The digital mailing address of the user.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the company member user.",
                "type": "string"
              },
              "name": {
                "description": "The user's full name.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The whop username.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "joined_at",
          "access_level",
          "status",
          "most_recent_action",
          "most_recent_action_at",
          "user",
          "phone",
          "usd_total_spent",
          "company_token_balance",
          "company"
        ],
        "type": "object"
      },
      "MemberListItem": {
        "description": "A member represents a user's relationship with a company on Whop, including their access level, status, and spending history.",
        "properties": {
          "access_level": {
            "$ref": "#/components/schemas/AccessLevel",
            "description": "The member's content access level. `admin` means their team role grants administrative content access, `customer` means they hold a valid product membership, and `no_access` means they cannot access company content."
          },
          "company_token_balance": {
            "description": "The member's token balance for this company. Computed live from the ledger, not from a cache.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the company member was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the company member.",
            "type": "string"
          },
          "joined_at": {
            "description": "When the member joined the company",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "most_recent_action": {
            "description": "The most recent action the member has taken.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              {
                "type": "null"
              }
            ]
          },
          "most_recent_action_at": {
            "description": "The time for the most recent action, if applicable.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "The phone number for the member, if available.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MemberStatuses",
            "description": "The status of the member"
          },
          "updated_at": {
            "description": "The datetime the company member was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total_spent": {
            "description": "How much money this customer has spent on the company's products and plans",
            "example": 6.9,
            "type": "number"
          },
          "user": {
            "description": "The user for this member, if any.",
            "properties": {
              "email": {
                "description": "The digital mailing address of the user.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the company member user.",
                "type": "string"
              },
              "name": {
                "description": "The user's full name.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The whop username.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "joined_at",
          "access_level",
          "status",
          "most_recent_action",
          "most_recent_action_at",
          "user",
          "phone",
          "usd_total_spent",
          "company_token_balance"
        ],
        "type": "object"
      },
      "MemberMostRecentActions": {
        "description": "The different most recent actions a member can have.",
        "enum": [
          "canceling",
          "churned",
          "finished_split_pay",
          "paused",
          "paid_subscriber",
          "paid_once",
          "expiring",
          "joined",
          "drafted",
          "left",
          "trialing",
          "pending_entry",
          "renewing",
          "past_due"
        ],
        "type": "string"
      },
      "MemberStatuses": {
        "description": "The different statuses a Member can have.",
        "enum": [
          "drafted",
          "joined",
          "left"
        ],
        "type": "string"
      },
      "MembersSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "usd_total_spent",
          "created_at",
          "joined_at",
          "most_recent_action"
        ],
        "type": "string"
      },
      "Membership": {
        "description": "A membership represents an active relationship between a user and a product. It tracks the user's access, billing status, and renewal schedule.",
        "properties": {
          "cancel_at_period_end": {
            "description": "Whether this membership is set to cancel at the end of the current billing cycle. Only applies to memberships with a recurring plan.",
            "type": "boolean"
          },
          "cancel_option": {
            "description": "The category selected for why the member canceled (e.g. too_expensive, switching, missing_features).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancelOptions"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelation_status": {
            "description": "Whether the customer is canceling, left, or was won back. Null if the membership has no cancellation reason or its cancellation state is indeterminate.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancelationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_at": {
            "description": "The time the customer initiated cancellation of this membership. As a Unix timestamp. Null if the membership has not been canceled.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_reason": {
            "description": "Free-text explanation provided by the customer when canceling. Null if the customer did not provide a reason.",
            "example": "I found a better alternative.",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this membership, if any. Use this to map memberships back to the checkout configuration that created them.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company this membership belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the membership was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code for this membership's billing. Null if the membership is free.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_field_responses": {
            "description": "The customer's responses to custom checkout questions configured on the product at the time of purchase.",
            "items": {
              "description": "The response from a custom field on checkout",
              "properties": {
                "answer": {
                  "description": "The response a user gave to the specific question or field.",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the custom field response.",
                  "example": "cfrp_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "question": {
                  "description": "The question asked by the custom field",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "question",
                "answer"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "formatted_renewal_price": {
            "description": "The recurring renewal price for this membership, formatted with currency symbol and billing interval. Null if the membership is not recurring.",
            "example": "$25.00 / month",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the membership.",
            "example": "mem_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "initial_price_paid": {
            "description": "The amount the customer paid when first purchasing this membership, formatted with currency symbol.",
            "example": "$25.00",
            "type": "string"
          },
          "joined_at": {
            "description": "The time the user first joined the company associated with this membership. As a Unix timestamp. Null if the member record does not exist.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "license_key": {
            "description": "The software license key associated with this membership. Only present if the product includes a Whop Software Licensing experience. Null otherwise.",
            "example": "A1B2C3-D4E5F6-G7H8I9",
            "type": [
              "string",
              "null"
            ]
          },
          "manage_url": {
            "description": "The URL where the customer can view and manage this membership, including cancellation and plan changes. Null if no member record exists.",
            "example": "https://whop.com/billing/manage/mem_abc123",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member record linking the user to the company for this membership. Null if the member record has not been created yet.",
            "properties": {
              "id": {
                "description": "The unique identifier for the member.",
                "example": "mber_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs for the membership (commonly used for software licensing, e.g., HWID). Max 50 keys, 100 chars per key, 500 chars per string value.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_collection_paused": {
            "description": "Whether recurring payment collection for this membership is temporarily paused by the company.",
            "type": "boolean"
          },
          "plan": {
            "description": "The plan the customer purchased to create this membership.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this plan.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "metadata"
            ],
            "type": "object"
          },
          "product": {
            "description": "The product this membership grants access to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
                "type": [
                  "object",
                  "null"
                ]
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "metadata"
            ],
            "type": "object"
          },
          "promo_code": {
            "description": "The promotional code currently applied to this membership's billing. Null if no promo code is active.",
            "properties": {
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "renewal_period_end": {
            "description": "The end of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "renewal_period_start": {
            "description": "The start of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MembershipStatus",
            "description": "The current lifecycle status of the membership (e.g., active, trialing, past_due, canceled, expired, completed)."
          },
          "updated_at": {
            "description": "The datetime the membership was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this membership. Null if the user account has been deleted.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_pic": {
                "description": "The URL of the user's profile picture. Use profilePicture for the full attachment object.",
                "type": "string"
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name",
              "email",
              "profile_pic"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "joined_at",
          "updated_at",
          "manage_url",
          "member",
          "user",
          "renewal_period_start",
          "renewal_period_end",
          "cancel_at_period_end",
          "cancel_option",
          "cancelation_status",
          "cancellation_reason",
          "canceled_at",
          "currency",
          "formatted_renewal_price",
          "initial_price_paid",
          "company",
          "plan",
          "promo_code",
          "product",
          "license_key",
          "metadata",
          "payment_collection_paused",
          "checkout_configuration_id",
          "custom_field_responses"
        ],
        "type": "object"
      },
      "MembershipCancellationModes": {
        "description": "The mode of cancellation for a membership",
        "enum": [
          "at_period_end",
          "immediate"
        ],
        "type": "string"
      },
      "MembershipListItem": {
        "description": "A membership represents an active relationship between a user and a product. It tracks the user's access, billing status, and renewal schedule.",
        "properties": {
          "cancel_at_period_end": {
            "description": "Whether this membership is set to cancel at the end of the current billing cycle. Only applies to memberships with a recurring plan.",
            "type": "boolean"
          },
          "cancel_option": {
            "description": "The category selected for why the member canceled (e.g. too_expensive, switching, missing_features).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancelOptions"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelation_status": {
            "description": "Whether the customer is canceling, left, or was won back. Null if the membership has no cancellation reason or its cancellation state is indeterminate.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancelationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_at": {
            "description": "The time the customer initiated cancellation of this membership. As a Unix timestamp. Null if the membership has not been canceled.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_reason": {
            "description": "Free-text explanation provided by the customer when canceling. Null if the customer did not provide a reason.",
            "example": "I found a better alternative.",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this membership, if any. Use this to map memberships back to the checkout configuration that created them.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company this membership belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the membership was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code for this membership's billing. Null if the membership is free.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "formatted_renewal_price": {
            "description": "The recurring renewal price for this membership, formatted with currency symbol and billing interval. Null if the membership is not recurring.",
            "example": "$25.00 / month",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the membership.",
            "example": "mem_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "initial_price_paid": {
            "description": "The amount the customer paid when first purchasing this membership, formatted with currency symbol.",
            "example": "$25.00",
            "type": "string"
          },
          "joined_at": {
            "description": "The time the user first joined the company associated with this membership. As a Unix timestamp. Null if the member record does not exist.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "license_key": {
            "description": "The software license key associated with this membership. Only present if the product includes a Whop Software Licensing experience. Null otherwise.",
            "example": "A1B2C3-D4E5F6-G7H8I9",
            "type": [
              "string",
              "null"
            ]
          },
          "manage_url": {
            "description": "The URL where the customer can view and manage this membership, including cancellation and plan changes. Null if no member record exists.",
            "example": "https://whop.com/billing/manage/mem_abc123",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member record linking the user to the company for this membership. Null if the member record has not been created yet.",
            "properties": {
              "id": {
                "description": "The unique identifier for the member.",
                "example": "mber_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs for the membership (commonly used for software licensing, e.g., HWID). Max 50 keys, 100 chars per key, 500 chars per string value.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_collection_paused": {
            "description": "Whether recurring payment collection for this membership is temporarily paused by the company.",
            "type": "boolean"
          },
          "plan": {
            "description": "The plan the customer purchased to create this membership.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this plan.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "metadata"
            ],
            "type": "object"
          },
          "product": {
            "description": "The product this membership grants access to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
                "type": [
                  "object",
                  "null"
                ]
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "metadata"
            ],
            "type": "object"
          },
          "promo_code": {
            "description": "The promotional code currently applied to this membership's billing. Null if no promo code is active.",
            "properties": {
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "renewal_period_end": {
            "description": "The end of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "renewal_period_start": {
            "description": "The start of the current billing period for this recurring membership. As a Unix timestamp. Null if the membership is not recurring.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MembershipStatus",
            "description": "The current lifecycle status of the membership (e.g., active, trialing, past_due, canceled, expired, completed)."
          },
          "updated_at": {
            "description": "The datetime the membership was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this membership. Null if the user account has been deleted.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_pic": {
                "description": "The URL of the user's profile picture. Use profilePicture for the full attachment object.",
                "type": "string"
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name",
              "email",
              "profile_pic"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "joined_at",
          "updated_at",
          "manage_url",
          "member",
          "user",
          "renewal_period_start",
          "renewal_period_end",
          "cancel_at_period_end",
          "cancel_option",
          "cancelation_status",
          "cancellation_reason",
          "canceled_at",
          "currency",
          "formatted_renewal_price",
          "initial_price_paid",
          "company",
          "plan",
          "promo_code",
          "product",
          "license_key",
          "metadata",
          "payment_collection_paused",
          "checkout_configuration_id"
        ],
        "type": "object"
      },
      "MembershipStatus": {
        "description": "The status of a membership",
        "enum": [
          "trialing",
          "active",
          "past_due",
          "completed",
          "canceled",
          "expired",
          "unresolved",
          "drafted",
          "canceling"
        ],
        "type": "string"
      },
      "MembershipsSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "status",
          "canceled_at",
          "date_joined",
          "total_spend"
        ],
        "type": "string"
      },
      "Message": {
        "description": "A message sent within an experience chat, direct message, or group chat.",
        "properties": {
          "content": {
            "description": "The message content formatted as Markdown. Null if the message has no text content.",
            "example": "Hey, are you available for a **quick call**?",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The timestamp when this message was originally created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether the message content has been edited after it was originally sent.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this message is pinned to the top of the channel for easy access.",
            "type": "boolean"
          },
          "mentions": {
            "description": "A list of user IDs that are explicitly mentioned in this message.",
            "items": {
              "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
              "type": "string"
            },
            "type": "array"
          },
          "mentions_everyone": {
            "description": "Whether the message includes an @everyone mention that notifies all channel members.",
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/DmsPostTypes",
            "description": "The classification of this message: regular, system, or automated."
          },
          "poll": {
            "description": "A poll attached to this message. Null if the message does not contain a poll.",
            "properties": {
              "options": {
                "description": "The options for the poll",
                "items": {
                  "description": "Represents a single poll option",
                  "properties": {
                    "id": {
                      "description": "The unique identifier for the poll option.",
                      "type": "string"
                    },
                    "text": {
                      "description": "The text of the poll option",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "text"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "options"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "poll_votes": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "option_id": {
                  "description": "The reaction that was used",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "option_id",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "reaction_counts": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "emoji": {
                  "description": "The emoji that was used in shortcode format (:heart:)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "emoji",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "replying_to_message_id": {
            "description": "The unique identifier of the message this post is replying to. Null if this is not a reply.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The timestamp when this message was last modified.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this message.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The number of unique views this message has received. Null if view tracking is not enabled for this channel.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "content",
          "created_at",
          "updated_at",
          "poll",
          "replying_to_message_id",
          "is_edited",
          "is_pinned",
          "message_type",
          "mentions",
          "mentions_everyone",
          "user",
          "view_count",
          "reaction_counts",
          "poll_votes"
        ],
        "type": "object"
      },
      "MessageChannelOrder": {
        "description": "Sort options for message channels",
        "enum": [
          "created_at",
          "last_post_sent_at"
        ],
        "type": "string"
      },
      "MessageListItem": {
        "description": "A message sent within an experience chat, direct message, or group chat.",
        "properties": {
          "content": {
            "description": "The message content formatted as Markdown. Null if the message has no text content.",
            "example": "Hey, are you available for a **quick call**?",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The timestamp when this message was originally created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether the message content has been edited after it was originally sent.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this message is pinned to the top of the channel for easy access.",
            "type": "boolean"
          },
          "mentions": {
            "description": "A list of user IDs that are explicitly mentioned in this message.",
            "items": {
              "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
              "type": "string"
            },
            "type": "array"
          },
          "mentions_everyone": {
            "description": "Whether the message includes an @everyone mention that notifies all channel members.",
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/DmsPostTypes",
            "description": "The classification of this message: regular, system, or automated."
          },
          "poll": {
            "description": "A poll attached to this message. Null if the message does not contain a poll.",
            "properties": {
              "options": {
                "description": "The options for the poll",
                "items": {
                  "description": "Represents a single poll option",
                  "properties": {
                    "id": {
                      "description": "The unique identifier for the poll option.",
                      "type": "string"
                    },
                    "text": {
                      "description": "The text of the poll option",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "text"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "options"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "poll_votes": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "option_id": {
                  "description": "The reaction that was used",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "option_id",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "reaction_counts": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "emoji": {
                  "description": "The emoji that was used in shortcode format (:heart:)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "emoji",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "replying_to_message_id": {
            "description": "The unique identifier of the message this post is replying to. Null if this is not a reply.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The timestamp when this message was last modified.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this message.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The number of unique views this message has received. Null if view tracking is not enabled for this channel.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "content",
          "created_at",
          "updated_at",
          "poll",
          "replying_to_message_id",
          "is_edited",
          "is_pinned",
          "message_type",
          "mentions",
          "mentions_everyone",
          "user",
          "view_count",
          "reaction_counts",
          "poll_votes"
        ],
        "type": "object"
      },
      "MuxAssetStatuses": {
        "description": "Mux asset statuses",
        "enum": [
          "uploading",
          "created",
          "ready"
        ],
        "type": "string"
      },
      "PageInfo": {
        "description": "Information about pagination in a connection.",
        "properties": {
          "end_cursor": {
            "description": "When paginating forwards, the cursor to continue.",
            "type": [
              "string",
              "null"
            ]
          },
          "has_next_page": {
            "description": "When paginating forwards, are there more items?",
            "type": "boolean"
          },
          "has_previous_page": {
            "description": "When paginating backwards, are there more items?",
            "type": "boolean"
          },
          "start_cursor": {
            "description": "When paginating backwards, the cursor to continue.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "end_cursor",
          "start_cursor",
          "has_next_page",
          "has_previous_page"
        ],
        "type": "object"
      },
      "Payment": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "amount_after_fees": {
            "description": "How much the payment is for after fees",
            "example": 6.9,
            "type": "number"
          },
          "application_fee": {
            "description": "The application fee charged on this payment.",
            "properties": {
              "amount": {
                "description": "The application fee amount.",
                "example": 6.9,
                "type": "number"
              },
              "amount_captured": {
                "description": "The amount of the application fee that has been captured.",
                "example": 6.9,
                "type": "number"
              },
              "amount_refunded": {
                "description": "The amount of the application fee that has been refunded.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the application fee was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the application fee."
              },
              "id": {
                "description": "The unique identifier for the application fee.",
                "example": "apfee_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "amount",
              "amount_captured",
              "amount_refunded",
              "currency",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "auto_refunded": {
            "description": "Whether this payment was auto refunded or not",
            "type": "boolean"
          },
          "billing_address": {
            "description": "The address of the user who made the payment.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "billing_reason": {
            "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BillingReasons"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CardBrands"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_exp_month": {
            "description": "The expiration month (1-12) of the card used for this payment. Falls back to the declined card on failed payments with no saved card. Null when the payment was not made with a card or the expiry is unavailable.",
            "example": 6,
            "type": [
              "integer",
              "null"
            ]
          },
          "card_exp_year": {
            "description": "The four-digit expiration year of the card used for this payment. Falls back to the declined card on failed payments with no saved card. Null when the payment was not made with a card or the expiry is unavailable.",
            "example": 2027,
            "type": [
              "integer",
              "null"
            ]
          },
          "card_last4": {
            "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
            "example": "4242",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company for the payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "customer_phone": {
            "description": "Phone number the customer provided at checkout, or their verified phone number when your checkout requires phone verification. `null` when no phone number was collected.",
            "type": [
              "string",
              "null"
            ]
          },
          "decline_code": {
            "description": "The reason the payment was declined. Null if the payment did not fail.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentDeclineCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "dispute_alerted_at": {
            "description": "When an alert came in that this transaction will be disputed",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "disputes": {
            "description": "The disputes attached to this payment. Null if the actor in context does not have the payment:dispute:read permission.",
            "items": {
              "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
              "properties": {
                "amount": {
                  "description": "The disputed amount in the specified currency, formatted as a decimal.",
                  "example": 6.9,
                  "type": "number"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The three-letter ISO currency code for the disputed amount."
                },
                "editable": {
                  "description": "Whether the dispute evidence can still be edited and submitted.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the dispute.",
                  "example": "dspt_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "needs_response_by": {
                  "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "description": "Additional freeform notes submitted by the company as part of the dispute evidence.",
                  "example": "Customer used the product for 3 months before disputing.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "description": "A human-readable reason for the dispute.",
                  "example": "Product Not Received",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/DisputeStatuses",
                  "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
                }
              },
              "required": [
                "id",
                "amount",
                "currency",
                "status",
                "editable",
                "needs_response_by",
                "reason",
                "notes"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "fees": {
            "description": "The fees associated with this specific payment.",
            "items": {
              "description": "Represents a fee related to a payment",
              "properties": {
                "amount": {
                  "description": "The value or amount to display for the fee.",
                  "example": 6.9,
                  "type": "number"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The currency of the fee."
                },
                "name": {
                  "description": "The label to display for the fee.",
                  "type": "string"
                },
                "type": {
                  "$ref": "#/components/schemas/SpecificFeeOrigins",
                  "description": "The specific origin of the fee, if applicable.",
                  "example": "payment_processing_percentage_fee"
                }
              },
              "required": [
                "name",
                "amount",
                "currency",
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "financing_installments_count": {
            "description": "The number of financing installments for the payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "financing_transactions": {
            "description": "The financing transactions attached to this payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).",
            "items": {
              "description": "A payment transaction.",
              "properties": {
                "amount": {
                  "description": "The amount of the payment transaction.",
                  "example": 6.9,
                  "type": "number"
                },
                "created_at": {
                  "description": "The date and time the payment transaction was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the payment transaction.",
                  "example": "ptx_xxxxxxxxxxxxxx",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/PaymentTransactionStatuses",
                  "description": "The status of the payment transaction."
                },
                "transaction_type": {
                  "$ref": "#/components/schemas/PaymentTransactionTypes",
                  "description": "The type of the payment transaction."
                }
              },
              "required": [
                "id",
                "amount",
                "status",
                "created_at",
                "transaction_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "last_payment_attempt": {
            "description": "The time of the last payment attempt.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "phone": {
                "description": "The phone number for the member, if available.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "phone"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "membership": {
            "description": "The membership attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the membership.",
                "example": "mem_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "phone_number": {
                "description": "The phone number associated with this membership.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MembershipStatus",
                "description": "The state of the membership."
              }
            },
            "required": [
              "id",
              "status",
              "phone_number"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
            "type": [
              "object",
              "null"
            ]
          },
          "needs_tracking": {
            "description": "Whether this payment is holding funds until the order ships and has no tracking number yet.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "next_payment_attempt": {
            "description": "The time of the next schedule payment retry.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_instrument": {
            "description": "The instrument this payment was made with, shaped for display: the method type, a buyer-facing name, the standard icon set, and the card facts when it was a card. Null when the receipt names no payment method.",
            "properties": {
              "card": {
                "description": "Card payments only: the card's network and last four.",
                "properties": {
                  "brand": {
                    "description": "The network identifier (`visa`, `amex`, …), matching `card.networks` entries and saved card payment methods.",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The card's last four digits, when captured.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "display_name": {
                "description": "Buyer-facing instrument name — \"Visa •••• 4242\" when the card surfaced, else the method's own name (\"Klarna\").",
                "type": "string"
              },
              "icons": {
                "description": "The standard icon set: square and card shapes, each in light and dark colorways.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "installment_count": {
                "description": "Installment methods only: how many payments the charge splits into. Data, not copy — compose and translate the label client-side.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The payment method type identifier, e.g. `card`, `klarna`, `apple_pay`.",
                "type": "string"
              }
            },
            "required": [
              "payment_method_type",
              "display_name",
              "installment_count",
              "card",
              "icons"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The tokenized payment method reference used for this payment. Null if no token was used.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "fingerprint": {
                    "description": "A stable identifier for the underlying card. Two payment methods with the same fingerprint are the same card. Null if not available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "fingerprint",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method_type": {
            "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments_failed": {
            "description": "The number of failed payment attempts for the payment.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "plan": {
            "description": "The plan attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "internal_notes": {
                "description": "A personal description or notes section for the business.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this plan.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "internal_notes",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product this payment was made for",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
                "type": [
                  "object",
                  "null"
                ]
              },
              "route": {
                "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                "example": "pickaxe-analytics",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_code": {
            "description": "The promo code used for this payment.",
            "properties": {
              "amount_off": {
                "description": "The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).",
                "example": 6.9,
                "type": "number"
              },
              "base_currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The monetary currency of the promo code."
              },
              "code": {
                "description": "The specific code used to apply the promo at checkout.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              },
              "number_of_intervals": {
                "description": "The number of months the promo is applied for.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "promo_type": {
                "$ref": "#/components/schemas/PromoTypes",
                "description": "The type (% or flat amount) of the promo."
              }
            },
            "required": [
              "id",
              "code",
              "amount_off",
              "base_currency",
              "promo_type",
              "number_of_intervals"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "recovery_url": {
            "description": "Whop-hosted URL where the buyer can sign in and complete 3D Secure for a failed subscription renewal. `null` when recovery is unavailable or you lack `member:basic:read`.",
            "type": [
              "string",
              "null"
            ]
          },
          "refundable": {
            "description": "True only for payments that are `paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.",
            "type": "boolean"
          },
          "refunded_amount": {
            "description": "The payment refund amount(if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "refunded_at": {
            "description": "When the payment was refunded (if applicable).",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "refunds": {
            "description": "The refunds issued against this payment, newest first, including failed and canceled refund attempts. Limited to the 100 most recent.",
            "items": {
              "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
              "properties": {
                "amount": {
                  "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
                  "example": 6.9,
                  "type": "number"
                },
                "created_at": {
                  "description": "The datetime the refund was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The three-letter ISO currency code for the refunded amount."
                },
                "id": {
                  "description": "The unique identifier for the refund.",
                  "example": "rf_xxxxxxxxxxxxxxx",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/RefundStatuses",
                  "description": "The current processing status of the refund, such as pending, succeeded, or failed."
                }
              },
              "required": [
                "id",
                "status",
                "amount",
                "currency",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "resolutions": {
            "description": "The resolution center cases opened by the customer on this payment. Null if the actor in context does not have the payment:resolution_center_case:read permission.",
            "items": {
              "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
              "properties": {
                "customer_appealed": {
                  "description": "Whether the customer has filed an appeal after the initial resolution decision.",
                  "type": "boolean"
                },
                "customer_response_actions": {
                  "description": "The list of actions currently available to the customer.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
                  },
                  "type": "array"
                },
                "due_date": {
                  "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the resolution.",
                  "example": "reso_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "issue": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
                  "description": "The category of the dispute."
                },
                "merchant_appealed": {
                  "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
                  "type": "boolean"
                },
                "merchant_response_actions": {
                  "description": "The list of actions currently available to the merchant.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
                  },
                  "type": "array"
                },
                "platform_response_actions": {
                  "description": "The list of actions currently available to the Whop platform for moderating this resolution.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCasePlatformResponses"
                  },
                  "type": "array"
                },
                "status": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
                  "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
                }
              },
              "required": [
                "id",
                "status",
                "due_date",
                "issue",
                "customer_appealed",
                "merchant_appealed",
                "customer_response_actions",
                "merchant_response_actions",
                "platform_response_actions"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "retryable": {
            "description": "True when the payment status is `open` and its membership is in one of the retry-eligible states (`active`, `trialing`, `completed`, or `past_due`), or when it is a failed initial billing-engine payment on a `drafted` membership with an unlimited-stock plan; otherwise false. Used to decide if Whop can attempt the charge again.",
            "type": "boolean"
          },
          "risk_score": {
            "description": "Whop's in-house fraud risk score for this payment, from 0 (lowest risk) to 100 (highest risk). Null when the payment has not been scored or scoring has not yet completed.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "risk_signals": {
            "additionalProperties": true,
            "description": "A curated set of factors behind the risk score, grouped by category (business transaction history, buyer, device). Each entry has a key, human-readable label, category, and value. Null when there is no risk assessment for this payment.",
            "type": [
              "object",
              "null"
            ]
          },
          "settlement_amount": {
            "description": "The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.",
            "example": 6.9,
            "type": "number"
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "settlement_exchange_rate": {
            "description": "Deprecated. Always returns null.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "settlement_time_at": {
            "description": "When this payment's funds post to the company's available balance, at midnight UTC. Known at payment time and never changes. The `ledger_account.funds_available` webhook carries the same `settlement_time_at` when that batch posts — match them to know these funds are now withdrawable.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "shipment": {
            "description": "The shipment attached to this payment.",
            "properties": {
              "carrier": {
                "description": "The shipping carrier detected for this shipment. Null until a tracking update identifies it.",
                "example": "usps",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the shipment.",
                "example": "ship_xxxxxxxxxxxxx",
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/ShipmentStatuses",
                "description": "The current delivery status of this shipment."
              },
              "tracking_number": {
                "description": "The carrier-assigned tracking number used to look up shipment progress.",
                "example": "9400111899223456789012",
                "type": "string"
              },
              "tracking_url": {
                "description": "A customer-facing URL to track this shipment's progress.",
                "example": "https://track.aftership.com/9400111899223456789012",
                "type": "string"
              }
            },
            "required": [
              "id",
              "status",
              "tracking_number",
              "carrier",
              "tracking_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "shipping_address": {
            "description": "The shipping address provided by the customer for physical goods. Null if no shipping address was collected.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "substatus": {
            "$ref": "#/components/schemas/FriendlyReceiptStatus",
            "description": "The friendly status of the payment."
          },
          "subtotal": {
            "description": "The subtotal to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The calculated amount of the sales/VAT tax (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_behavior": {
            "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptTaxBehaviors"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_refunded_amount": {
            "description": "The amount of tax that has been refunded (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "three_ds_verified": {
            "description": "Whether 3D Secure authentication was completed for this payment.",
            "type": "boolean"
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the payment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total": {
            "description": "The total in USD to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "user": {
            "description": "The user that made this payment.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "verification_checks": {
            "description": "The issuer's address and card security code check results for this payment. Null when the processor returned none.",
            "properties": {
              "address_line1": {
                "description": "Whether the billing street address the customer entered matched the address the issuer has on file.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "card_holder_name": {
                "description": "Whether the cardholder name the customer entered matched the name the issuer has on file.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "card_security_code": {
                "description": "Whether the CVV / CVC the customer entered matched the card.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip_code": {
                "description": "Whether the billing postal code the customer entered matched the postal code the issuer has on file.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address_line1",
              "zip_code",
              "card_holder_name",
              "card_security_code"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "voidable": {
            "description": "True when the payment is tied to a membership in `past_due`, the payment status is `open`, and the processor allows voiding payments; otherwise false.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "substatus",
          "refundable",
          "retryable",
          "voidable",
          "created_at",
          "updated_at",
          "paid_at",
          "last_payment_attempt",
          "next_payment_attempt",
          "dispute_alerted_at",
          "refunded_at",
          "plan",
          "product",
          "user",
          "membership",
          "member",
          "customer_phone",
          "payment_instrument",
          "payment_method",
          "company",
          "promo_code",
          "currency",
          "settlement_currency",
          "total",
          "subtotal",
          "usd_total",
          "refunded_amount",
          "auto_refunded",
          "amount_after_fees",
          "application_fee",
          "card_brand",
          "card_last4",
          "billing_address",
          "shipping_address",
          "needs_tracking",
          "shipment",
          "payment_method_type",
          "billing_reason",
          "payments_failed",
          "tax_amount",
          "tax_behavior",
          "failure_message",
          "decline_code",
          "metadata",
          "checkout_configuration_id",
          "recovery_url",
          "settlement_time_at",
          "settlement_amount",
          "settlement_exchange_rate",
          "tax_refunded_amount",
          "fees",
          "card_exp_month",
          "card_exp_year",
          "financing_installments_count",
          "financing_transactions",
          "refunds",
          "disputes",
          "resolutions",
          "risk_score",
          "risk_signals",
          "three_ds_verified",
          "verification_checks"
        ],
        "type": "object"
      },
      "PaymentDeclineCodes": {
        "description": "The reason a payment was declined.",
        "enum": [
          "insufficient_funds",
          "lost_card",
          "stolen_card",
          "expired_card",
          "suspected_fraud",
          "invalid_card_number",
          "invalid_cvc",
          "invalid_cvc_or_expiration",
          "incorrect_pin",
          "authentication_required",
          "card_not_supported",
          "currency_not_supported",
          "duplicate_transaction",
          "generic_decline",
          "invalid_account",
          "invalid_amount",
          "processing_error",
          "restricted_card",
          "card_velocity_exceeded",
          "contact_issuer",
          "bank_declined",
          "regulatory_blocked",
          "transaction_not_permitted",
          "transaction_stopped",
          "card_type_not_supported",
          "issuer_not_found",
          "closed_account",
          "issuer_unavailable",
          "invalid_zip",
          "invalid_expiry_month",
          "invalid_expiry_year",
          "invalid_expiry",
          "invalid_transaction",
          "cannot_authorize",
          "pin_required",
          "pin_try_exceeded",
          "provider_declined",
          "high_risk",
          "test_mode_decline",
          "merchant_blacklist",
          "reenter_transaction",
          "invalid_pin",
          "pin_required_as",
          "withdrawal_count_limit_exceeded",
          "invalid_country",
          "issuer_error",
          "invalid_card_holder_name",
          "no_accounts",
          "transaction_cancelled",
          "three_d_secure_success",
          "three_d_secure_canceled",
          "three_d_secure_invalid_card_number",
          "three_d_secure_generic_error",
          "three_d_secure_timeout",
          "three_d_secure_failed",
          "three_d_secure_card_not_enrolled",
          "three_d_secure_fraud",
          "three_d_secure_too_many_attempts",
          "three_d_secure_rejected_by_bank",
          "three_d_secure_reported_lost_or_stolen",
          "blocked_by_cardholder",
          "test_mode_test_card",
          "try_again_later",
          "transaction_not_allowed",
          "bank_insufficient_funds",
          "bank_account_not_found",
          "bank_account_closed",
          "bank_account_frozen",
          "bank_invalid_routing_number",
          "bank_non_transaction_account",
          "bank_authorization_revoked",
          "bank_payment_stopped",
          "bank_not_authorized",
          "bank_account_holder_deceased",
          "bank_duplicate",
          "bank_amount_error",
          "bank_regulatory_blocked",
          "bank_details_invalid",
          "bank_processing_error",
          "bank_generic_decline",
          "sepa_invalid_iban",
          "sepa_no_mandate",
          "sepa_mandate_data_invalid",
          "sepa_disputed",
          "sepa_refused_by_customer",
          "sepa_generic_decline"
        ],
        "type": "string"
      },
      "PaymentListItem": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "amount_after_fees": {
            "description": "How much the payment is for after fees",
            "example": 6.9,
            "type": "number"
          },
          "application_fee": {
            "description": "The application fee charged on this payment.",
            "properties": {
              "amount": {
                "description": "The application fee amount.",
                "example": 6.9,
                "type": "number"
              },
              "amount_captured": {
                "description": "The amount of the application fee that has been captured.",
                "example": 6.9,
                "type": "number"
              },
              "amount_refunded": {
                "description": "The amount of the application fee that has been refunded.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the application fee was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the application fee."
              },
              "id": {
                "description": "The unique identifier for the application fee.",
                "example": "apfee_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "amount",
              "amount_captured",
              "amount_refunded",
              "currency",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "auto_refunded": {
            "description": "Whether this payment was auto refunded or not",
            "type": "boolean"
          },
          "billing_address": {
            "description": "The address of the user who made the payment.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "billing_reason": {
            "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BillingReasons"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CardBrands"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_last4": {
            "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
            "example": "4242",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company for the payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "customer_phone": {
            "description": "Phone number the customer provided at checkout, or their verified phone number when your checkout requires phone verification. `null` when no phone number was collected.",
            "type": [
              "string",
              "null"
            ]
          },
          "decline_code": {
            "description": "The reason the payment was declined. Null if the payment did not fail.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentDeclineCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "dispute_alerted_at": {
            "description": "When an alert came in that this transaction will be disputed",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "last_payment_attempt": {
            "description": "The time of the last payment attempt.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "phone": {
                "description": "The phone number for the member, if available.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "phone"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "membership": {
            "description": "The membership attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the membership.",
                "example": "mem_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "phone_number": {
                "description": "The phone number associated with this membership.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MembershipStatus",
                "description": "The state of the membership."
              }
            },
            "required": [
              "id",
              "status",
              "phone_number"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
            "type": [
              "object",
              "null"
            ]
          },
          "needs_tracking": {
            "description": "Whether this payment is holding funds until the order ships and has no tracking number yet.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "next_payment_attempt": {
            "description": "The time of the next schedule payment retry.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_instrument": {
            "description": "The instrument this payment was made with, shaped for display: the method type, a buyer-facing name, the standard icon set, and the card facts when it was a card. Null when the receipt names no payment method.",
            "properties": {
              "card": {
                "description": "Card payments only: the card's network and last four.",
                "properties": {
                  "brand": {
                    "description": "The network identifier (`visa`, `amex`, …), matching `card.networks` entries and saved card payment methods.",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The card's last four digits, when captured.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "display_name": {
                "description": "Buyer-facing instrument name — \"Visa •••• 4242\" when the card surfaced, else the method's own name (\"Klarna\").",
                "type": "string"
              },
              "icons": {
                "description": "The standard icon set: square and card shapes, each in light and dark colorways.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "installment_count": {
                "description": "Installment methods only: how many payments the charge splits into. Data, not copy — compose and translate the label client-side.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The payment method type identifier, e.g. `card`, `klarna`, `apple_pay`.",
                "type": "string"
              }
            },
            "required": [
              "payment_method_type",
              "display_name",
              "installment_count",
              "card",
              "icons"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The tokenized payment method reference used for this payment. Null if no token was used.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "fingerprint": {
                    "description": "A stable identifier for the underlying card. Two payment methods with the same fingerprint are the same card. Null if not available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "fingerprint",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method_type": {
            "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments_failed": {
            "description": "The number of failed payment attempts for the payment.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "plan": {
            "description": "The plan attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "internal_notes": {
                "description": "A personal description or notes section for the business.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this plan.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "internal_notes",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product this payment was made for",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "metadata": {
                "additionalProperties": true,
                "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
                "type": [
                  "object",
                  "null"
                ]
              },
              "route": {
                "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                "example": "pickaxe-analytics",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_code": {
            "description": "The promo code used for this payment.",
            "properties": {
              "amount_off": {
                "description": "The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).",
                "example": 6.9,
                "type": "number"
              },
              "base_currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The monetary currency of the promo code."
              },
              "code": {
                "description": "The specific code used to apply the promo at checkout.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              },
              "number_of_intervals": {
                "description": "The number of months the promo is applied for.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "promo_type": {
                "$ref": "#/components/schemas/PromoTypes",
                "description": "The type (% or flat amount) of the promo."
              }
            },
            "required": [
              "id",
              "code",
              "amount_off",
              "base_currency",
              "promo_type",
              "number_of_intervals"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "refundable": {
            "description": "True only for payments that are `paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.",
            "type": "boolean"
          },
          "refunded_amount": {
            "description": "The payment refund amount(if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "refunded_at": {
            "description": "When the payment was refunded (if applicable).",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "retryable": {
            "description": "True when the payment status is `open` and its membership is in one of the retry-eligible states (`active`, `trialing`, `completed`, or `past_due`), or when it is a failed initial billing-engine payment on a `drafted` membership with an unlimited-stock plan; otherwise false. Used to decide if Whop can attempt the charge again.",
            "type": "boolean"
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "shipment": {
            "description": "The shipment attached to this payment.",
            "properties": {
              "carrier": {
                "description": "The shipping carrier detected for this shipment. Null until a tracking update identifies it.",
                "example": "usps",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the shipment.",
                "example": "ship_xxxxxxxxxxxxx",
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/ShipmentStatuses",
                "description": "The current delivery status of this shipment."
              },
              "tracking_number": {
                "description": "The carrier-assigned tracking number used to look up shipment progress.",
                "example": "9400111899223456789012",
                "type": "string"
              },
              "tracking_url": {
                "description": "A customer-facing URL to track this shipment's progress.",
                "example": "https://track.aftership.com/9400111899223456789012",
                "type": "string"
              }
            },
            "required": [
              "id",
              "status",
              "tracking_number",
              "carrier",
              "tracking_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "shipping_address": {
            "description": "The shipping address provided by the customer for physical goods. Null if no shipping address was collected.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "substatus": {
            "$ref": "#/components/schemas/FriendlyReceiptStatus",
            "description": "The friendly status of the payment."
          },
          "subtotal": {
            "description": "The subtotal to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The calculated amount of the sales/VAT tax (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_behavior": {
            "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptTaxBehaviors"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the payment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total": {
            "description": "The total in USD to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "user": {
            "description": "The user that made this payment.",
            "properties": {
              "email": {
                "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                "example": "john.doe@example.com",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "voidable": {
            "description": "True when the payment is tied to a membership in `past_due`, the payment status is `open`, and the processor allows voiding payments; otherwise false.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "substatus",
          "refundable",
          "retryable",
          "voidable",
          "created_at",
          "updated_at",
          "paid_at",
          "last_payment_attempt",
          "next_payment_attempt",
          "dispute_alerted_at",
          "refunded_at",
          "plan",
          "product",
          "user",
          "membership",
          "member",
          "customer_phone",
          "payment_instrument",
          "payment_method",
          "company",
          "promo_code",
          "currency",
          "settlement_currency",
          "total",
          "subtotal",
          "usd_total",
          "refunded_amount",
          "auto_refunded",
          "amount_after_fees",
          "application_fee",
          "card_brand",
          "card_last4",
          "billing_address",
          "shipping_address",
          "needs_tracking",
          "shipment",
          "payment_method_type",
          "billing_reason",
          "payments_failed",
          "tax_amount",
          "tax_behavior",
          "failure_message",
          "decline_code",
          "metadata",
          "checkout_configuration_id"
        ],
        "type": "object"
      },
      "PaymentMethod": {
        "discriminator": {
          "propertyName": "typename"
        },
        "oneOf": [
          {
            "description": "A saved payment method with no type-specific details available.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "BasePaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons"
            ],
            "title": "BasePaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved card payment method, including brand, last four digits, and expiration details.",
            "properties": {
              "card": {
                "description": "The card-specific details for this payment method, including brand, last four digits, and expiration.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "expired": {
                    "description": "Whether the card is past its expiration month. An expired card cannot take a new charge.",
                    "type": "boolean"
                  },
                  "fingerprint": {
                    "description": "A stable identifier for the underlying card. Two payment methods with the same fingerprint are the same card. Null if not available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "funding_type": {
                    "description": "How the card is funded by the issuer. Null if the funding type could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardFundingTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "three_ds_verified": {
                    "description": "Whether this card was verified with 3D Secure, either when it was saved or on a payment that used it.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand",
                  "fingerprint",
                  "last4",
                  "exp_month",
                  "exp_year",
                  "funding_type",
                  "expired",
                  "three_ds_verified"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "has_payer_document": {
                "description": "Whether this card has the payer identity document required by its payment provider.",
                "type": "boolean"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CardPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "has_payer_document",
              "card"
            ],
            "title": "CardPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved US bank account payment method, including bank name, last four digits, and account type.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "UsBankAccountPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              },
              "us_bank_account": {
                "description": "The bank account-specific details for this payment method, including bank name and last four digits.",
                "properties": {
                  "account_type": {
                    "description": "The type of bank account (e.g., checking, savings).",
                    "example": "checking",
                    "type": "string"
                  },
                  "bank_name": {
                    "description": "The name of the financial institution holding the account.",
                    "example": "Chase",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The last four digits of the bank account number.",
                    "example": "6789",
                    "type": "string"
                  }
                },
                "required": [
                  "bank_name",
                  "last4",
                  "account_type"
                ],
                "type": "object"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "us_bank_account"
            ],
            "title": "UsBankAccountPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved Cash App payment method, including the buyer's cashtag and unique identifier.",
            "properties": {
              "cashapp": {
                "description": "The Cash App-specific details for this payment method, including cashtag and buyer ID.",
                "properties": {
                  "buyer_id": {
                    "description": "The unique and immutable identifier assigned by Cash App to the buyer. Null if not available.",
                    "example": "BUYER_abc123",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cashtag": {
                    "description": "The public cashtag handle of the buyer on Cash App. Null if not available.",
                    "example": "$jacksmith",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "buyer_id",
                  "cashtag"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CashappPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "cashapp"
            ],
            "title": "CashappPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved iDEAL payment method, including the customer's bank name and BIC code.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "ideal": {
                "description": "The iDEAL-specific details for this payment method, including bank name and BIC.",
                "properties": {
                  "bank": {
                    "description": "The name of the customer's bank used for the iDEAL transaction. Null if not available.",
                    "example": "ing",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "description": "The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not available.",
                    "example": "INGBNL2A",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank",
                  "bic"
                ],
                "type": "object"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "IdealPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "ideal"
            ],
            "title": "IdealPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "sepa_debit": {
                "description": "The SEPA Direct Debit-specific details for this payment method, including bank code and last four IBAN digits.",
                "properties": {
                  "bank_code": {
                    "description": "The bank code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "37040044",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "branch_code": {
                    "description": "The branch code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "0532",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The two-letter ISO country code where the bank account is located. Null if not available.",
                    "example": "DE",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the IBAN associated with this SEPA account. Null if not available.",
                    "example": "3000",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank_code",
                  "branch_code",
                  "country",
                  "last4"
                ],
                "type": "object"
              },
              "typename": {
                "const": "SepaDebitPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "sepa_debit"
            ],
            "title": "SepaDebitPaymentMethod",
            "type": "object"
          }
        ],
        "type": "object"
      },
      "PaymentMethodListItem": {
        "discriminator": {
          "propertyName": "typename"
        },
        "oneOf": [
          {
            "description": "A saved payment method with no type-specific details available.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "BasePaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons"
            ],
            "title": "BasePaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved card payment method, including brand, last four digits, and expiration details.",
            "properties": {
              "card": {
                "description": "The card-specific details for this payment method, including brand, last four digits, and expiration.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "expired": {
                    "description": "Whether the card is past its expiration month. An expired card cannot take a new charge.",
                    "type": "boolean"
                  },
                  "fingerprint": {
                    "description": "A stable identifier for the underlying card. Two payment methods with the same fingerprint are the same card. Null if not available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "funding_type": {
                    "description": "How the card is funded by the issuer. Null if the funding type could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardFundingTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "three_ds_verified": {
                    "description": "Whether this card was verified with 3D Secure, either when it was saved or on a payment that used it.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand",
                  "fingerprint",
                  "last4",
                  "exp_month",
                  "exp_year",
                  "funding_type",
                  "expired",
                  "three_ds_verified"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "has_payer_document": {
                "description": "Whether this card has the payer identity document required by its payment provider.",
                "type": "boolean"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CardPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "has_payer_document",
              "card"
            ],
            "title": "CardPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved US bank account payment method, including bank name, last four digits, and account type.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "UsBankAccountPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              },
              "us_bank_account": {
                "description": "The bank account-specific details for this payment method, including bank name and last four digits.",
                "properties": {
                  "account_type": {
                    "description": "The type of bank account (e.g., checking, savings).",
                    "example": "checking",
                    "type": "string"
                  },
                  "bank_name": {
                    "description": "The name of the financial institution holding the account.",
                    "example": "Chase",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The last four digits of the bank account number.",
                    "example": "6789",
                    "type": "string"
                  }
                },
                "required": [
                  "bank_name",
                  "last4",
                  "account_type"
                ],
                "type": "object"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "us_bank_account"
            ],
            "title": "UsBankAccountPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved Cash App payment method, including the buyer's cashtag and unique identifier.",
            "properties": {
              "cashapp": {
                "description": "The Cash App-specific details for this payment method, including cashtag and buyer ID.",
                "properties": {
                  "buyer_id": {
                    "description": "The unique and immutable identifier assigned by Cash App to the buyer. Null if not available.",
                    "example": "BUYER_abc123",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cashtag": {
                    "description": "The public cashtag handle of the buyer on Cash App. Null if not available.",
                    "example": "$jacksmith",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "buyer_id",
                  "cashtag"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CashappPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "cashapp"
            ],
            "title": "CashappPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved iDEAL payment method, including the customer's bank name and BIC code.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "ideal": {
                "description": "The iDEAL-specific details for this payment method, including bank name and BIC.",
                "properties": {
                  "bank": {
                    "description": "The name of the customer's bank used for the iDEAL transaction. Null if not available.",
                    "example": "ing",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "description": "The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not available.",
                    "example": "INGBNL2A",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank",
                  "bic"
                ],
                "type": "object"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "IdealPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "ideal"
            ],
            "title": "IdealPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "icons": {
                "description": "Every rendition of the icon to display this payment method with. A saved card carries its brand's icon (Visa, Mastercard, ...) rather than the generic card art.",
                "properties": {
                  "card": {
                    "description": "The credit-card-proportioned tile (48x30).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  },
                  "square": {
                    "description": "The square tile (32x32).",
                    "properties": {
                      "dark": {
                        "description": "The colorway for dark surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      },
                      "light": {
                        "description": "The colorway for light surfaces.",
                        "properties": {
                          "png_1x": {
                            "description": "Raster fallback at the shape's native size.",
                            "type": "string"
                          },
                          "png_2x": {
                            "description": "Raster fallback at double density.",
                            "type": "string"
                          },
                          "png_4x": {
                            "description": "Raster fallback at quadruple density.",
                            "type": "string"
                          },
                          "svg": {
                            "description": "The vector file. Prefer this everywhere SVG renders.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "svg",
                          "png_1x",
                          "png_2x",
                          "png_4x"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "light",
                      "dark"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "square",
                  "card"
                ],
                "type": "object"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "sepa_debit": {
                "description": "The SEPA Direct Debit-specific details for this payment method, including bank code and last four IBAN digits.",
                "properties": {
                  "bank_code": {
                    "description": "The bank code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "37040044",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "branch_code": {
                    "description": "The branch code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "0532",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The two-letter ISO country code where the bank account is located. Null if not available.",
                    "example": "DE",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the IBAN associated with this SEPA account. Null if not available.",
                    "example": "3000",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank_code",
                  "branch_code",
                  "country",
                  "last4"
                ],
                "type": "object"
              },
              "typename": {
                "const": "SepaDebitPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "icons",
              "sepa_debit"
            ],
            "title": "SepaDebitPaymentMethod",
            "type": "object"
          }
        ],
        "type": "object"
      },
      "PaymentMethodTypes": {
        "description": "The different types of payment methods that can be used.",
        "enum": [
          "acss_debit",
          "addi",
          "affirm",
          "afterpay_clearpay",
          "alipay",
          "alma",
          "amazon_pay",
          "apple",
          "apple_pay",
          "au_bank_transfer",
          "au_becs_debit",
          "bacs_debit",
          "bancolombia",
          "bancontact",
          "bank_wire",
          "billie",
          "bizum",
          "blik",
          "boleto",
          "bre_b",
          "ca_bank_transfer",
          "capchase_pay",
          "card",
          "card_installments_three",
          "card_installments_six",
          "card_installments_twelve",
          "cashapp",
          "claritypay",
          "coinbase",
          "crypto",
          "custom",
          "customer_balance",
          "demo_pay",
          "efecty",
          "eps",
          "eu_bank_transfer",
          "fpx",
          "flex_pay",
          "gb_bank_transfer",
          "gcash",
          "giropay",
          "google_pay",
          "gopay",
          "grabpay",
          "id_bank_transfer",
          "ideal",
          "interac",
          "kakao_pay",
          "klarna",
          "klarna_pay_now",
          "konbini",
          "kr_card",
          "kr_market",
          "kriya",
          "kueski",
          "link",
          "mb_way",
          "m_pesa",
          "mercado_pago",
          "mercado_pago_ar",
          "mercado_pago_mx",
          "mobilepay",
          "modo",
          "mondu",
          "multibanco",
          "naver_pay",
          "nequi",
          "netbanking",
          "ng_bank",
          "ng_bank_transfer",
          "ng_card",
          "ng_market",
          "ng_ussd",
          "ng_wallet",
          "nupay",
          "nz_bank_account",
          "oney",
          "oney_3x",
          "oney_4x",
          "opay",
          "oxxo",
          "p24",
          "pago_efectivo",
          "pse",
          "pay_by_bank",
          "payco",
          "paynow",
          "paypal",
          "paypay",
          "payto",
          "pix",
          "platform_balance",
          "promptpay",
          "qris",
          "rapipago",
          "rechnung",
          "revolut_pay",
          "samsung_pay",
          "satispay",
          "scalapay",
          "sencillito",
          "sepa_debit",
          "sequra",
          "servipag",
          "sezzle",
          "shop_pay",
          "shopeepay",
          "sofort",
          "south_korea_market",
          "spei",
          "splitit",
          "sunbit",
          "swish",
          "tamara",
          "twint",
          "upi",
          "us_bank_account",
          "us_bank_transfer",
          "venmo",
          "verve",
          "vipps",
          "webpay",
          "wechat_pay",
          "yape",
          "zip",
          "coinflow",
          "unknown"
        ],
        "type": "string"
      },
      "PaymentProviders": {
        "description": "The different payment providers.",
        "enum": [
          "stripe",
          "coinbase",
          "paypal",
          "apple",
          "sezzle",
          "splitit",
          "platform_balance",
          "multi_psp",
          "adyen",
          "claritypay",
          "flex_pay",
          "checkout_dot_com",
          "airwallex",
          "coinflow",
          "sequra",
          "dlocal",
          "masspay",
          "braintree"
        ],
        "type": "string"
      },
      "PaymentTransactionStatuses": {
        "description": "The different statuses a payment transaction can be in.",
        "enum": [
          "succeeded",
          "declined",
          "error",
          "pending",
          "created",
          "expired",
          "won",
          "rejected",
          "lost",
          "prevented",
          "canceled"
        ],
        "type": "string"
      },
      "PaymentTransactionTypes": {
        "description": "The different types of payment transactions.",
        "enum": [
          "purchase",
          "authorize",
          "capture",
          "refund",
          "canceled",
          "verify",
          "chargeback",
          "pre_chargeback",
          "three_d_secure",
          "fraud_screening",
          "authorization",
          "installment"
        ],
        "type": "string"
      },
      "PaymentsApprovalStatuses": {
        "description": "The different approval statuses an account can have.",
        "enum": [
          "pending",
          "approved",
          "monitoring",
          "rejected"
        ],
        "type": "string"
      },
      "PayoutAccount": {
        "description": "An object representing an account used for payouts.",
        "properties": {
          "address": {
            "description": "The physical address associated with this payout account",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "postal_code",
              "state",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "The company's legal name",
            "type": [
              "string",
              "null"
            ]
          },
          "business_representative": {
            "description": "The business representative for this payout account",
            "properties": {
              "date_of_birth": {
                "description": "The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_name": {
                "description": "The first name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_name": {
                "description": "The last name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "middle_name": {
                "description": "The middle name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "date_of_birth",
              "first_name",
              "middle_name",
              "last_name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "email": {
            "description": "The email address of the representative",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout account.",
            "example": "poact_xxxxxxxxxxxx",
            "type": "string"
          },
          "latest_verification": {
            "description": "The latest verification for the connected account.",
            "properties": {
              "id": {
                "description": "The numeric id of the verification record.",
                "example": "verf_xxxxxxxxxxxxx",
                "type": "string"
              },
              "last_error_code": {
                "description": "The most recent error code returned during verification. Null if no error has occurred.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/VerificationErrorCodes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error_reason": {
                "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                "example": "Document image was too blurry to read.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/VerificationStatuses",
                "description": "The current status of this verification session."
              }
            },
            "required": [
              "id",
              "status",
              "last_error_code",
              "last_error_reason"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "The business representative's phone",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "The granular calculated status of the payout account reflecting its current KYC and payout readiness state.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "business_name",
          "phone",
          "email",
          "business_representative",
          "address",
          "latest_verification"
        ],
        "type": "object"
      },
      "PayoutAccountCalculatedStatuses": {
        "description": "The granular calculated statuses reflecting payout account KYC and payout readiness.",
        "enum": [
          "connected",
          "disabled",
          "action_required",
          "pending_verification",
          "verification_failed",
          "manual_review",
          "denied",
          "not_started",
          "blocked_by_parent"
        ],
        "type": "string"
      },
      "PayoutDestinationCategory": {
        "description": "The category of a payout destination.",
        "enum": [
          "crypto",
          "rtp",
          "next_day_bank",
          "bank_wire",
          "digital_wallet",
          "unknown"
        ],
        "type": "string"
      },
      "PayoutMethod": {
        "description": "A configured payout destination where a user receives earned funds, such as a bank account or digital wallet.",
        "properties": {
          "account_reference": {
            "description": "A masked identifier for the payout destination, such as the last four digits of a bank account or an email address. Null if no reference is available.",
            "example": "****1234",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company associated with this payout destination. Null if not linked to a specific company.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payout token was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code that payouts are delivered in for this destination.",
            "example": "USD",
            "type": "string"
          },
          "destination": {
            "description": "The payout destination configuration linked to this token. Null if not yet configured.",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/PayoutDestinationCategory",
                "description": "The category of the payout destination"
              },
              "country_code": {
                "description": "The country code of the payout destination",
                "type": "string"
              },
              "name": {
                "description": "The name of the payer associated with the payout destination",
                "type": "string"
              }
            },
            "required": [
              "country_code",
              "category",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout token.",
            "example": "potk_xxxxxxxxxxxxx",
            "type": "string"
          },
          "institution_name": {
            "description": "The name of the bank or financial institution receiving payouts. Null if not applicable or not provided.",
            "example": "Frost Bank",
            "type": [
              "string",
              "null"
            ]
          },
          "is_default": {
            "description": "Whether this is the default payout destination for the associated payout account.",
            "type": "boolean"
          },
          "nickname": {
            "description": "A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set.",
            "example": "Ops checking",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "company",
          "nickname",
          "currency",
          "is_default",
          "account_reference",
          "institution_name",
          "destination"
        ],
        "type": "object"
      },
      "PayoutMethodListItem": {
        "description": "A configured payout destination where a user receives earned funds, such as a bank account or digital wallet.",
        "properties": {
          "account_reference": {
            "description": "A masked identifier for the payout destination, such as the last four digits of a bank account or an email address. Null if no reference is available.",
            "example": "****1234",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company associated with this payout destination. Null if not linked to a specific company.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payout token was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code that payouts are delivered in for this destination.",
            "example": "USD",
            "type": "string"
          },
          "destination": {
            "description": "The payout destination configuration linked to this token. Null if not yet configured.",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/PayoutDestinationCategory",
                "description": "The category of the payout destination"
              },
              "country_code": {
                "description": "The country code of the payout destination",
                "type": "string"
              },
              "name": {
                "description": "The name of the payer associated with the payout destination",
                "type": "string"
              }
            },
            "required": [
              "country_code",
              "category",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout token.",
            "example": "potk_xxxxxxxxxxxxx",
            "type": "string"
          },
          "institution_name": {
            "description": "The name of the bank or financial institution receiving payouts. Null if not applicable or not provided.",
            "example": "Frost Bank",
            "type": [
              "string",
              "null"
            ]
          },
          "is_default": {
            "description": "Whether this is the default payout destination for the associated payout account.",
            "type": "boolean"
          },
          "nickname": {
            "description": "A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set.",
            "example": "Ops checking",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "company",
          "nickname",
          "currency",
          "is_default",
          "account_reference",
          "institution_name",
          "destination"
        ],
        "type": "object"
      },
      "PlanThreeDsLevels": {
        "description": "The 3D Secure behavior for a plan.",
        "enum": [
          "mandate_challenge",
          "frictionless"
        ],
        "type": "string"
      },
      "PlanTypes": {
        "description": "The type of plan that can be attached to a product",
        "enum": [
          "renewal",
          "one_time"
        ],
        "type": "string"
      },
      "Product": {
        "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
        "properties": {
          "company": {
            "description": "The company this product belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "route",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the product was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "custom_cta": {
            "$ref": "#/components/schemas/CustomCtas",
            "description": "Call-to-action button label shown on the product purchase page."
          },
          "custom_cta_url": {
            "description": "An optional URL that the call-to-action button links to instead of the default checkout flow. Null if no custom URL is set.",
            "example": "https://example.com/signup",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_statement_descriptor": {
            "description": "Custom bank statement descriptor for product purchases. Maximum 22 characters, including required `WHOP*` prefix.",
            "example": "PICKAXE",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "A brief summary of what the product offers, displayed on product pages and search results.",
            "example": "Track your revenue, members, and growth in real time.",
            "type": [
              "string",
              "null"
            ]
          },
          "external_identifier": {
            "description": "External identifier for the product. Providing it on a product creation endpoint updates the existing product with this identifier instead of creating a new one.",
            "example": "ext_prod_12345",
            "type": [
              "string",
              "null"
            ]
          },
          "gallery_images": {
            "description": "The gallery images for this product, ordered by position.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "url",
                "content_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "global_affiliate_percentage": {
            "description": "Marketplace affiliate commission percentage for this product, or `null` if program is inactive.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "global_affiliate_status": {
            "$ref": "#/components/schemas/GlobalAffiliateStatuses",
            "description": "The enrollment status of this product in the Whop marketplace global affiliate program."
          },
          "headline": {
            "description": "A short marketing headline displayed prominently on the product's product page.",
            "example": "Real-time data analytics for creators",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the product.",
            "example": "prod_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member_affiliate_percentage": {
            "description": "Member referral commission percentage for this product, or `null` if program is inactive.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "member_affiliate_status": {
            "$ref": "#/components/schemas/GlobalAffiliateStatuses",
            "description": "The enrollment status of this product in the member affiliate program."
          },
          "member_count": {
            "description": "Active memberships for this product. Returns `0` if the account has disabled public member counts.",
            "example": 42,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
            "type": [
              "object",
              "null"
            ]
          },
          "owner_user": {
            "description": "The user who owns the company that sells this product.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          },
          "product_tax_code": {
            "description": "The tax classification code applied to purchases of this product for sales tax calculation. Null if no tax code is assigned.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product tax code.",
                "example": "ptc_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "Human-readable name of this tax classification, such as 'Digital - SaaS'.",
                "example": "Digital - SaaS",
                "type": "string"
              },
              "product_type": {
                "$ref": "#/components/schemas/ProductTaxCodeProductTypes",
                "description": "Broad product category this tax code covers, such as physical goods or digital services."
              }
            },
            "required": [
              "id",
              "name",
              "product_type"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews for this product's company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
            "example": "pickaxe-analytics",
            "type": "string"
          },
          "title": {
            "description": "The display name of the product shown to customers on the product page and in search results.",
            "example": "Pickaxe Analytics",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the product was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Controls whether the product is visible to customers. When set to 'hidden', the product is only accessible via direct link."
          }
        },
        "required": [
          "id",
          "title",
          "visibility",
          "headline",
          "verified",
          "created_at",
          "updated_at",
          "member_count",
          "route",
          "published_reviews_count",
          "external_identifier",
          "metadata",
          "gallery_images",
          "description",
          "custom_cta",
          "custom_cta_url",
          "custom_statement_descriptor",
          "global_affiliate_percentage",
          "global_affiliate_status",
          "member_affiliate_percentage",
          "member_affiliate_status",
          "product_tax_code",
          "owner_user",
          "company"
        ],
        "type": "object"
      },
      "ProductListItem": {
        "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
        "properties": {
          "created_at": {
            "description": "The datetime the product was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "external_identifier": {
            "description": "External identifier for the product. Providing it on a product creation endpoint updates the existing product with this identifier instead of creating a new one.",
            "example": "ext_prod_12345",
            "type": [
              "string",
              "null"
            ]
          },
          "gallery_images": {
            "description": "The gallery images for this product, ordered by position.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "url",
                "content_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "headline": {
            "description": "A short marketing headline displayed prominently on the product's product page.",
            "example": "Real-time data analytics for creators",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the product.",
            "example": "prod_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member_count": {
            "description": "Active memberships for this product. Returns `0` if the account has disabled public member counts.",
            "example": 42,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
            "type": [
              "object",
              "null"
            ]
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews for this product's company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
            "example": "pickaxe-analytics",
            "type": "string"
          },
          "title": {
            "description": "The display name of the product shown to customers on the product page and in search results.",
            "example": "Pickaxe Analytics",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the product was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Controls whether the product is visible to customers. When set to 'hidden', the product is only accessible via direct link."
          }
        },
        "required": [
          "id",
          "title",
          "visibility",
          "headline",
          "verified",
          "created_at",
          "updated_at",
          "member_count",
          "route",
          "published_reviews_count",
          "external_identifier",
          "metadata",
          "gallery_images"
        ],
        "type": "object"
      },
      "ProductTaxCodeProductTypes": {
        "description": "The product_type of the ProductTaxCode",
        "enum": [
          "physical",
          "digital",
          "services"
        ],
        "type": "string"
      },
      "PromoCode": {
        "description": "A promo code applies a discount to a plan during checkout. Promo codes can be percentage-based or fixed-amount, and can have usage limits and expiration dates.",
        "properties": {
          "amount_off": {
            "description": "The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).",
            "example": 6.9,
            "type": "number"
          },
          "churned_users_only": {
            "description": "Restricts promo use to only users who have churned from the company before.",
            "type": "boolean"
          },
          "code": {
            "description": "The specific code used to apply the promo at checkout.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company for the promo code.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the promo code was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The monetary currency of the promo code."
          },
          "duration": {
            "description": "The duration of the promo.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PromoDurations"
              },
              {
                "type": "null"
              }
            ]
          },
          "existing_memberships_only": {
            "description": "Restricts promo use to only be applied to already purchased memberships.",
            "type": "boolean"
          },
          "expires_at": {
            "description": "The date/time of when the promo expires.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the promo code.",
            "example": "promo_xxxxxxxxxxxx",
            "type": "string"
          },
          "new_users_only": {
            "description": "Restricts promo use to only users who have never purchased from the company before.",
            "type": "boolean"
          },
          "one_per_customer": {
            "description": "Restricts promo use to only be applied once per customer.",
            "type": "boolean"
          },
          "product": {
            "description": "The product this promo code applies to",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_duration_months": {
            "description": "The number of months the promo is applied for.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "promo_type": {
            "$ref": "#/components/schemas/PromoTypes",
            "description": "The type (% or flat amount) of the promo."
          },
          "status": {
            "$ref": "#/components/schemas/PromoCodeStatus",
            "description": "Indicates if the promo code is live or disabled."
          },
          "stock": {
            "description": "The quantity limit on the number of uses.",
            "example": 42,
            "type": "integer"
          },
          "unlimited_stock": {
            "description": "Whether or not the promo code has unlimited stock.",
            "type": "boolean"
          },
          "uses": {
            "description": "The amount of times the promo codes has been used.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "amount_off",
          "currency",
          "churned_users_only",
          "code",
          "created_at",
          "existing_memberships_only",
          "duration",
          "expires_at",
          "new_users_only",
          "promo_duration_months",
          "one_per_customer",
          "product",
          "promo_type",
          "status",
          "stock",
          "unlimited_stock",
          "uses",
          "company"
        ],
        "type": "object"
      },
      "PromoCodeListItem": {
        "description": "A promo code applies a discount to a plan during checkout. Promo codes can be percentage-based or fixed-amount, and can have usage limits and expiration dates.",
        "properties": {
          "amount_off": {
            "description": "The discount amount. Interpretation depends on promo_type: if 'percentage', this is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).",
            "example": 6.9,
            "type": "number"
          },
          "churned_users_only": {
            "description": "Restricts promo use to only users who have churned from the company before.",
            "type": "boolean"
          },
          "code": {
            "description": "The specific code used to apply the promo at checkout.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the promo code was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The monetary currency of the promo code."
          },
          "duration": {
            "description": "The duration of the promo.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PromoDurations"
              },
              {
                "type": "null"
              }
            ]
          },
          "existing_memberships_only": {
            "description": "Restricts promo use to only be applied to already purchased memberships.",
            "type": "boolean"
          },
          "expires_at": {
            "description": "The date/time of when the promo expires.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the promo code.",
            "example": "promo_xxxxxxxxxxxx",
            "type": "string"
          },
          "new_users_only": {
            "description": "Restricts promo use to only users who have never purchased from the company before.",
            "type": "boolean"
          },
          "one_per_customer": {
            "description": "Restricts promo use to only be applied once per customer.",
            "type": "boolean"
          },
          "product": {
            "description": "The product this promo code applies to",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_duration_months": {
            "description": "The number of months the promo is applied for.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "promo_type": {
            "$ref": "#/components/schemas/PromoTypes",
            "description": "The type (% or flat amount) of the promo."
          },
          "status": {
            "$ref": "#/components/schemas/PromoCodeStatus",
            "description": "Indicates if the promo code is live or disabled."
          },
          "stock": {
            "description": "The quantity limit on the number of uses.",
            "example": 42,
            "type": "integer"
          },
          "unlimited_stock": {
            "description": "Whether or not the promo code has unlimited stock.",
            "type": "boolean"
          },
          "uses": {
            "description": "The amount of times the promo codes has been used.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "amount_off",
          "currency",
          "churned_users_only",
          "code",
          "created_at",
          "existing_memberships_only",
          "duration",
          "expires_at",
          "new_users_only",
          "promo_duration_months",
          "one_per_customer",
          "product",
          "promo_type",
          "status",
          "stock",
          "unlimited_stock",
          "uses"
        ],
        "type": "object"
      },
      "PromoCodeStatus": {
        "description": "Statuses for promo codes",
        "enum": [
          "active",
          "inactive",
          "archived"
        ],
        "type": "string"
      },
      "PromoCodeUpdateStatus": {
        "description": "Statuses that can be applied to promo codes through update operations.",
        "enum": [
          "active",
          "inactive"
        ],
        "type": "string"
      },
      "PromoDurations": {
        "description": "The duration setting for the promo code",
        "enum": [
          "forever",
          "once",
          "repeating"
        ],
        "type": "string"
      },
      "PromoTypes": {
        "description": "The type of promo code used to discount a plan",
        "enum": [
          "percentage",
          "flat_amount"
        ],
        "type": "string"
      },
      "Reaction": {
        "description": "A single reaction left by a user on a feed post, such as a like or emoji.",
        "properties": {
          "emoji": {
            "description": "The emoji used for this reaction in shortcode format. Null if the reaction type is not emoji.",
            "example": ":heart:",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The unique identifier of the post this reaction was left on.",
            "type": "string"
          },
          "user": {
            "description": "The user who left this reaction on the post.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "resource_id",
          "user",
          "emoji"
        ],
        "type": "object"
      },
      "ReactionListItem": {
        "description": "A single reaction left by a user on a feed post, such as a like or emoji.",
        "properties": {
          "emoji": {
            "description": "The emoji used for this reaction in shortcode format. Null if the reaction type is not emoji.",
            "example": ":heart:",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The unique identifier of the post this reaction was left on.",
            "type": "string"
          },
          "user": {
            "description": "The user who left this reaction on the post.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "username",
              "name"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "resource_id",
          "user",
          "emoji"
        ],
        "type": "object"
      },
      "ReceiptStatus": {
        "description": "The status of a receipt",
        "enum": [
          "draft",
          "open",
          "authorized",
          "paid",
          "pending",
          "uncollectible",
          "unresolved",
          "void"
        ],
        "type": "string"
      },
      "ReceiptTaxBehaviors": {
        "description": "The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.",
        "enum": [
          "exclusive",
          "inclusive",
          "unspecified",
          "unable_to_collect"
        ],
        "type": "string"
      },
      "ReceiptV2Order": {
        "description": "The order to sort the results by.",
        "enum": [
          "final_amount",
          "created_at",
          "paid_at"
        ],
        "type": "string"
      },
      "Refund": {
        "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
        "properties": {
          "amount": {
            "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the refund was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the refunded amount."
          },
          "id": {
            "description": "The unique identifier for the refund.",
            "example": "rf_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The original payment that this refund was issued against. Null if the payment is no longer available.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "metadata": {
                "additionalProperties": true,
                "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "plan": {
                "description": "The plan attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the plan.",
                    "example": "plan_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs stored on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value. The reserved keys `custom_cta` and `custom_cta_url`, when set, override the product's checkout call to action for this plan.",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "metadata"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "product": {
                "description": "The product this payment was made for",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the product.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "metadata"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax_amount": {
                "description": "The calculated amount of the sales/VAT tax (if applicable).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax_behavior": {
                "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ReceiptTaxBehaviors"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_refunded_amount": {
                "description": "The amount of tax that has been refunded (if applicable).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "properties": {
                  "email": {
                    "description": "The user's email address. Requires the member:email:read permission to access. Null if not authorized.",
                    "example": "john.doe@example.com",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's display name shown on their public profile.",
                    "example": "John Doe",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The user's unique username shown on their public profile.",
                    "example": "johndoe42",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "tax_amount",
              "tax_behavior",
              "tax_refunded_amount",
              "metadata",
              "plan",
              "product",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProviders",
            "description": "The payment provider that processed the refund."
          },
          "provider_created_at": {
            "description": "The timestamp when the refund was created in the payment provider's system. Null if not available from the provider.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reference_status": {
            "description": "The availability status of the refund tracking reference from the payment processor. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_type": {
            "description": "The type of tracking reference provided by the payment processor, such as an acquirer reference number. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_value": {
            "description": "The tracking reference value from the payment processor, used to trace the refund through banking networks. Null if no reference was provided.",
            "example": "74850120752",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/RefundStatuses",
            "description": "The current processing status of the refund, such as pending, succeeded, or failed."
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "created_at",
          "provider",
          "provider_created_at",
          "reference_status",
          "reference_type",
          "reference_value",
          "payment"
        ],
        "type": "object"
      },
      "RefundListItem": {
        "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
        "properties": {
          "amount": {
            "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the refund was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the refunded amount."
          },
          "id": {
            "description": "The unique identifier for the refund.",
            "example": "rf_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The original payment that this refund was issued against. Null if the payment is no longer available.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProviders",
            "description": "The payment provider that processed the refund."
          },
          "provider_created_at": {
            "description": "The timestamp when the refund was created in the payment provider's system. Null if not available from the provider.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reference_status": {
            "description": "The availability status of the refund tracking reference from the payment processor. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_type": {
            "description": "The type of tracking reference provided by the payment processor, such as an acquirer reference number. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_value": {
            "description": "The tracking reference value from the payment processor, used to trace the refund through banking networks. Null if no reference was provided.",
            "example": "74850120752",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/RefundStatuses",
            "description": "The current processing status of the refund, such as pending, succeeded, or failed."
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "created_at",
          "provider",
          "provider_created_at",
          "reference_status",
          "reference_type",
          "reference_value",
          "payment"
        ],
        "type": "object"
      },
      "RefundReferenceStatuses": {
        "description": "The status of the refund reference.",
        "enum": [
          "available",
          "pending",
          "unavailable"
        ],
        "type": "string"
      },
      "RefundReferenceTypes": {
        "description": "The type of refund reference that was made available by the payment provider.",
        "enum": [
          "acquirer_reference_number",
          "retrieval_reference_number",
          "system_trace_audit_number"
        ],
        "type": "string"
      },
      "RefundStatuses": {
        "description": "The different statuses for a Refund object",
        "enum": [
          "pending",
          "requires_action",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "ReleaseMethod": {
        "description": "The methods of how a plan can be released.",
        "enum": [
          "buy_now",
          "waitlist"
        ],
        "type": "string"
      },
      "ResolutionCenterCase": {
        "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
        "properties": {
          "company": {
            "description": "The company involved in this resolution case. Null if the company no longer exists.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the resolution was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_appealed": {
            "description": "Whether the customer has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "customer_response_actions": {
            "description": "The list of actions currently available to the customer.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
            },
            "type": "array"
          },
          "due_date": {
            "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the resolution.",
            "example": "reso_xxxxxxxxxxxxx",
            "type": "string"
          },
          "issue": {
            "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
            "description": "The category of the dispute."
          },
          "member": {
            "description": "The membership record associated with the disputed payment. Null if the membership no longer exists.",
            "properties": {
              "id": {
                "description": "The unique identifier for the extra public member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "merchant_appealed": {
            "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "merchant_response_actions": {
            "description": "The list of actions currently available to the merchant.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
            },
            "type": "array"
          },
          "payment": {
            "description": "The payment record that is the subject of this resolution case.",
            "properties": {
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Currencies"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "subtotal": {
                "description": "The payment amount before taxes and discounts are applied. In the currency specified by the currency field.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.",
                "example": 6.9,
                "type": "number"
              }
            },
            "required": [
              "id",
              "currency",
              "created_at",
              "paid_at",
              "total",
              "subtotal"
            ],
            "type": "object"
          },
          "platform_response_actions": {
            "description": "The list of actions currently available to the Whop platform for moderating this resolution.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCasePlatformResponses"
            },
            "type": "array"
          },
          "resolution_events": {
            "description": "The most recent 50 messages, actions, and status changes that have occurred during this resolution case.",
            "items": {
              "description": "A resolution event is a message or action within a resolution case, such as a response, escalation, or status change.",
              "properties": {
                "action": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseActions",
                  "description": "The type of action recorded in this event."
                },
                "created_at": {
                  "description": "The datetime the resolution event was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "details": {
                  "description": "The message body or additional context provided with this resolution event. Null if no details were included.",
                  "example": "I did not authorize this purchase.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the resolution event.",
                  "example": "revt_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "reporter_type": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseReporters",
                  "description": "The party who performed this action."
                }
              },
              "required": [
                "id",
                "action",
                "reporter_type",
                "details",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
            "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
          },
          "updated_at": {
            "description": "The datetime the resolution was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The customer (buyer) who filed this resolution case.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "issue",
          "created_at",
          "updated_at",
          "due_date",
          "customer_appealed",
          "merchant_appealed",
          "customer_response_actions",
          "merchant_response_actions",
          "company",
          "user",
          "platform_response_actions",
          "payment",
          "member",
          "resolution_events"
        ],
        "type": "object"
      },
      "ResolutionCenterCaseActions": {
        "description": "The different types of actions for a resolution event",
        "enum": [
          "created",
          "responded",
          "accepted",
          "denied",
          "appealed",
          "withdrew",
          "requested_more_info",
          "escalated",
          "dispute_opened",
          "dispute_customer_won",
          "dispute_merchant_won"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseCustomerResponses": {
        "description": "The types of responses a customer can make to a resolution.",
        "enum": [
          "respond",
          "appeal",
          "withdraw"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseIssueTypes": {
        "description": "The different types of issues a resolution can be",
        "enum": [
          "forgot_to_cancel",
          "item_not_received",
          "significantly_not_as_described",
          "unauthorized_transaction",
          "product_unacceptable"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseListItem": {
        "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
        "properties": {
          "company": {
            "description": "The company involved in this resolution case. Null if the company no longer exists.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the resolution was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_appealed": {
            "description": "Whether the customer has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "customer_response_actions": {
            "description": "The list of actions currently available to the customer.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
            },
            "type": "array"
          },
          "due_date": {
            "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the resolution.",
            "example": "reso_xxxxxxxxxxxxx",
            "type": "string"
          },
          "issue": {
            "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
            "description": "The category of the dispute."
          },
          "merchant_appealed": {
            "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "merchant_response_actions": {
            "description": "The list of actions currently available to the merchant.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
            },
            "type": "array"
          },
          "payment": {
            "description": "The payment record that is the subject of this resolution case.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "status": {
            "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
            "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
          },
          "updated_at": {
            "description": "The datetime the resolution was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The customer (buyer) who filed this resolution case.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "issue",
          "created_at",
          "updated_at",
          "due_date",
          "customer_appealed",
          "merchant_appealed",
          "customer_response_actions",
          "merchant_response_actions",
          "company",
          "user",
          "payment"
        ],
        "type": "object"
      },
      "ResolutionCenterCaseMerchantResponses": {
        "description": "The types of responses a merchant can make to a resolution.",
        "enum": [
          "accept",
          "deny",
          "request_more_info",
          "appeal",
          "respond"
        ],
        "type": "string"
      },
      "ResolutionCenterCasePlatformResponses": {
        "description": "The types of responses the platform can make to a resolution.",
        "enum": [
          "request_buyer_info",
          "request_merchant_info",
          "merchant_wins",
          "merchant_refund"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseReporters": {
        "description": "The different types of reporters for a resolution event",
        "enum": [
          "merchant",
          "customer",
          "platform",
          "system"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseStatuses": {
        "description": "The statuses a resolution object can have",
        "enum": [
          "merchant_response_needed",
          "customer_response_needed",
          "merchant_info_needed",
          "customer_info_needed",
          "under_platform_review",
          "customer_won",
          "merchant_won",
          "customer_withdrew"
        ],
        "type": "string"
      },
      "Review": {
        "description": "A user-submitted review of a company, including a star rating and optional text feedback.",
        "properties": {
          "attachments": {
            "description": "A list of files and media attached to the review.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "company": {
            "description": "The company that this review was written for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the review was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "The body text of the review containing the user's detailed feedback. Returns an empty string if no description was provided.",
            "example": "Great product, really helped me grow my audience.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the review.",
            "example": "rev_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "joined_at": {
            "description": "The timestamp of when the reviewer first joined the product. Null if unknown.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_for_product": {
            "description": "Whether the reviewer paid for the product. Null if the payment status is unknown.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "product": {
            "description": "The product that this review was written for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the product shown to customers on the product page and in search results.",
                "example": "Pickaxe Analytics",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "published_at": {
            "description": "The timestamp of when the review was published. Null if the review has not been published yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "stars": {
            "description": "The star rating given by the reviewer, from 1 to 5.",
            "example": 42,
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ReviewStatus",
            "description": "The current moderation status of the review."
          },
          "title": {
            "description": "A short summary title for the review. Null if the reviewer did not provide one.",
            "example": "Amazing community and tools",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the review was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account of the person who wrote this review.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "stars",
          "status",
          "paid_for_product",
          "created_at",
          "updated_at",
          "published_at",
          "joined_at",
          "user",
          "attachments",
          "company",
          "product"
        ],
        "type": "object"
      },
      "ReviewListItem": {
        "description": "A user-submitted review of a company, including a star rating and optional text feedback.",
        "properties": {
          "attachments": {
            "description": "A list of files and media attached to the review.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "created_at": {
            "description": "The datetime the review was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "The body text of the review containing the user's detailed feedback. Returns an empty string if no description was provided.",
            "example": "Great product, really helped me grow my audience.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the review.",
            "example": "rev_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "joined_at": {
            "description": "The timestamp of when the reviewer first joined the product. Null if unknown.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_for_product": {
            "description": "Whether the reviewer paid for the product. Null if the payment status is unknown.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "published_at": {
            "description": "The timestamp of when the review was published. Null if the review has not been published yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "stars": {
            "description": "The star rating given by the reviewer, from 1 to 5.",
            "example": 42,
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ReviewStatus",
            "description": "The current moderation status of the review."
          },
          "title": {
            "description": "A short summary title for the review. Null if the reviewer did not provide one.",
            "example": "Amazing community and tools",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the review was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account of the person who wrote this review.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "stars",
          "status",
          "paid_for_product",
          "created_at",
          "updated_at",
          "published_at",
          "joined_at",
          "user",
          "attachments"
        ],
        "type": "object"
      },
      "ReviewStatus": {
        "description": "The statuses a review can have",
        "enum": [
          "pending",
          "published",
          "removed"
        ],
        "type": "string"
      },
      "ScheduleFrequencies": {
        "description": "How often a scheduled bounty republishes a new bounty.",
        "enum": [
          "once",
          "hourly",
          "daily",
          "weekly",
          "monthly"
        ],
        "type": "string"
      },
      "SetupIntent": {
        "description": "A setup intent allows a user to save a payment method for future use without making an immediate purchase.",
        "properties": {
          "checkout_configuration": {
            "description": "The checkout session configuration associated with this setup intent. Null if no checkout session was used.",
            "properties": {
              "id": {
                "description": "The unique identifier for the checkout session.",
                "example": "ch_xxxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "company": {
            "description": "The company that initiated this setup intent. Null if the company has been deleted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the setup intent was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "error_message": {
            "description": "A human-readable error message explaining why the setup intent failed. Null if no error occurred.",
            "example": "Your card was declined.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the setup intent.",
            "example": "sint_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member associated with this setup intent. Null if the user is not a member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "user": {
                "description": "The user for this member, if any.",
                "properties": {
                  "email": {
                    "description": "The digital mailing address of the user.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the company member user.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's full name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The whop username.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "email",
                  "name",
                  "username"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "user"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this setup intent. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The saved payment method created by this setup intent. Null if the setup has not completed successfully.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "mailing_address": {
                "description": "The mailing address associated with the payment method's user",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "line1",
                  "line2",
                  "city",
                  "state",
                  "postal_code",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card",
              "mailing_address"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SetupIntentStatuses",
            "description": "The current status of the setup intent."
          },
          "three_ds_verified": {
            "description": "Whether 3D Secure authentication was completed when this payment method was set up.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "error_message",
          "company",
          "checkout_configuration",
          "member",
          "payment_method",
          "metadata",
          "three_ds_verified"
        ],
        "type": "object"
      },
      "SetupIntentListItem": {
        "description": "A setup intent allows a user to save a payment method for future use without making an immediate purchase.",
        "properties": {
          "checkout_configuration": {
            "description": "The checkout session configuration associated with this setup intent. Null if no checkout session was used.",
            "properties": {
              "id": {
                "description": "The unique identifier for the checkout session.",
                "example": "ch_xxxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "company": {
            "description": "The company that initiated this setup intent. Null if the company has been deleted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the setup intent was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "error_message": {
            "description": "A human-readable error message explaining why the setup intent failed. Null if no error occurred.",
            "example": "Your card was declined.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the setup intent.",
            "example": "sint_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member associated with this setup intent. Null if the user is not a member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "user": {
                "description": "The user for this member, if any.",
                "properties": {
                  "email": {
                    "description": "The digital mailing address of the user.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the company member user.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's full name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The whop username.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "email",
                  "name",
                  "username"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "user"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this setup intent. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The saved payment method created by this setup intent. Null if the setup has not completed successfully.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "mailing_address": {
                "description": "The mailing address associated with the payment method's user",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "line1",
                  "line2",
                  "city",
                  "state",
                  "postal_code",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card",
              "mailing_address"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SetupIntentStatuses",
            "description": "The current status of the setup intent."
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "error_message",
          "company",
          "checkout_configuration",
          "member",
          "payment_method",
          "metadata"
        ],
        "type": "object"
      },
      "SetupIntentStatuses": {
        "description": "The status of the setup intent.",
        "enum": [
          "processing",
          "succeeded",
          "canceled",
          "requires_action"
        ],
        "type": "string"
      },
      "Shipment": {
        "description": "A physical shipment associated with a payment, including carrier details and tracking information.",
        "properties": {
          "created_at": {
            "description": "The datetime the shipment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "delivery_estimate": {
            "description": "The estimated delivery date for this shipment. Null if the carrier has not provided an estimate.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the shipment.",
            "example": "ship_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with this shipment. Null if the payment has been deleted or is inaccessible.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "service": {
            "description": "The shipping service level used for this shipment. Null if the carrier does not specify a service tier.",
            "example": "Priority",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatuses",
            "description": "The current delivery status of this shipment."
          },
          "substatus": {
            "description": "A more granular status providing additional detail about the shipment's current state. Null if no substatus applies.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShipmentSubstatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "tracking_code": {
            "description": "The carrier-assigned tracking number used to look up shipment progress.",
            "example": "9400111899223456789012",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the shipment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "substatus",
          "tracking_code",
          "updated_at",
          "service",
          "delivery_estimate",
          "payment"
        ],
        "type": "object"
      },
      "ShipmentListItem": {
        "description": "A physical shipment associated with a payment, including carrier details and tracking information.",
        "properties": {
          "created_at": {
            "description": "The datetime the shipment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "delivery_estimate": {
            "description": "The estimated delivery date for this shipment. Null if the carrier has not provided an estimate.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the shipment.",
            "example": "ship_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with this shipment. Null if the payment has been deleted or is inaccessible.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "service": {
            "description": "The shipping service level used for this shipment. Null if the carrier does not specify a service tier.",
            "example": "Priority",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatuses",
            "description": "The current delivery status of this shipment."
          },
          "substatus": {
            "description": "A more granular status providing additional detail about the shipment's current state. Null if no substatus applies.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShipmentSubstatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "tracking_code": {
            "description": "The carrier-assigned tracking number used to look up shipment progress.",
            "example": "9400111899223456789012",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the shipment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "substatus",
          "tracking_code",
          "updated_at",
          "service",
          "delivery_estimate",
          "payment"
        ],
        "type": "object"
      },
      "ShipmentStatuses": {
        "description": "The status of a shipment",
        "enum": [
          "unknown",
          "pre_transit",
          "in_transit",
          "out_for_delivery",
          "delivered",
          "available_for_pickup",
          "return_to_sender",
          "failure",
          "cancelled",
          "error"
        ],
        "type": "string"
      },
      "ShipmentSubstatuses": {
        "description": "The substatus of a shipment",
        "enum": [
          "address_correction",
          "arrived_at_destination",
          "arrived_at_facility",
          "arrived_at_pickup_location",
          "awaiting_information",
          "substatus_cancelled",
          "damaged",
          "delayed",
          "delivery_exception",
          "departed_facility",
          "departed_origin_facility",
          "expired",
          "substatus_failure",
          "held",
          "substatus_in_transit",
          "label_created",
          "lost",
          "missorted",
          "substatus_out_for_delivery",
          "received_at_destination_facility",
          "received_at_origin_facility",
          "refused",
          "return",
          "status_update",
          "transferred_to_destination_carrier",
          "transit_exception",
          "substatus_unknown",
          "weather_delay"
        ],
        "type": "string"
      },
      "SpecificFeeOrigins": {
        "description": "The origin of the specific fee",
        "enum": [
          "stripe_domestic_processing_fee",
          "stripe_international_processing_fee",
          "stripe_fixed_processing_fee",
          "stripe_billing_fee",
          "stripe_radar_fee",
          "sales_tax_remittance",
          "sales_tax_remittance_reversal",
          "stripe_sales_tax_fee",
          "whop_processing_fee",
          "marketplace_affiliate_fee",
          "affiliate_fee",
          "crypto_fee",
          "stripe_standard_processing_fee",
          "paypal_fee",
          "stripe_payout_fee",
          "dispute_fee",
          "dispute_alert_fee",
          "apple_processing_fee",
          "buyer_fee",
          "sezzle_processing_fee",
          "splitit_processing_fee",
          "platform_balance_processing_fee",
          "payment_processing_percentage_fee",
          "payment_processing_fixed_fee",
          "cross_border_percentage_fee",
          "fx_percentage_fee",
          "orchestration_percentage_fee",
          "three_ds_fixed_fee",
          "billing_percentage_fee",
          "revshare_percentage_fee",
          "application_fee",
          "high_risk_merchant_fee"
        ],
        "type": "string"
      },
      "Status": {
        "description": "Statuses for resources",
        "enum": [
          "active",
          "archived",
          "deleted"
        ],
        "type": "string"
      },
      "Statuses": {
        "description": "The available bounty statuses to choose from.",
        "enum": [
          "published",
          "archived",
          "scheduled"
        ],
        "type": "string"
      },
      "SupportChannel": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "account_id": {
            "description": "The unique identifier of the account associated with this channel. Null if this is not a support or account-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The unique identifier of the account associated with this channel. Null if this is not a support or account-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_user": {
            "description": "The customer who initiated this support conversation. Null if this is not a support chat.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_at": {
            "description": "The timestamp when the linked support ticket was marked as resolved. Null if unresolved or not a support chat.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "account_id",
          "custom_name",
          "customer_user",
          "resolved_at",
          "last_message_at"
        ],
        "type": "object"
      },
      "SupportChannelListItem": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "account_id": {
            "description": "The unique identifier of the account associated with this channel. Null if this is not a support or account-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The unique identifier of the account associated with this channel. Null if this is not a support or account-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_user": {
            "description": "The customer who initiated this support conversation. Null if this is not a support chat.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The user's display name shown on their public profile.",
                "example": "John Doe",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The user's unique username shown on their public profile.",
                "example": "johndoe42",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_at": {
            "description": "The timestamp when the linked support ticket was marked as resolved. Null if unresolved or not a support chat.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "account_id",
          "custom_name",
          "customer_user",
          "resolved_at",
          "last_message_at"
        ],
        "type": "object"
      },
      "SupportChannelView": {
        "description": "The perspective to filter support channels by.",
        "enum": [
          "all",
          "admin",
          "customer"
        ],
        "type": "string"
      },
      "TaxIdentifierTypes": {
        "description": "The type of tax identifier",
        "enum": [
          "ad_nrt",
          "ao_tin",
          "ar_cuit",
          "al_tin",
          "am_tin",
          "aw_tin",
          "au_abn",
          "au_arn",
          "eu_vat",
          "az_tin",
          "bs_tin",
          "bh_vat",
          "bd_bin",
          "bb_tin",
          "by_tin",
          "bj_ifu",
          "bo_tin",
          "ba_tin",
          "br_cnpj",
          "br_cpf",
          "bg_uic",
          "bf_ifu",
          "kh_tin",
          "cm_niu",
          "ca_bn",
          "ca_gst_hst",
          "ca_pst_bc",
          "ca_pst_mb",
          "ca_pst_sk",
          "ca_qst",
          "cv_nif",
          "cl_tin",
          "cn_tin",
          "co_nit",
          "cd_nif",
          "cr_tin",
          "hr_oib",
          "do_rcn",
          "ec_ruc",
          "eg_tin",
          "sv_nit",
          "et_tin",
          "eu_oss_vat",
          "ge_vat",
          "gh_tin",
          "de_stn",
          "gb_vat",
          "gn_nif",
          "hk_br",
          "hu_tin",
          "is_vat",
          "in_gst",
          "id_npwp",
          "il_vat",
          "jp_cn",
          "jp_rn",
          "jp_trn",
          "kz_bin",
          "ke_pin",
          "kg_tin",
          "la_tin",
          "li_uid",
          "li_vat",
          "my_frp",
          "my_itn",
          "my_sst",
          "mr_nif",
          "mx_rfc",
          "md_vat",
          "me_pib",
          "ma_vat",
          "np_pan",
          "nz_gst",
          "ng_tin",
          "mk_vat",
          "no_vat",
          "no_voec",
          "om_vat",
          "pe_ruc",
          "ph_tin",
          "pl_nip",
          "ro_tin",
          "ru_inn",
          "ru_kpp",
          "sa_vat",
          "sn_ninea",
          "rs_pib",
          "sg_gst",
          "sg_uen",
          "si_tin",
          "za_vat",
          "kr_brn",
          "es_cif",
          "ch_uid",
          "ch_vat",
          "tw_vat",
          "tj_tin",
          "tz_vat",
          "th_vat",
          "tr_tin",
          "ug_tin",
          "ua_vat",
          "ae_trn",
          "us_ein",
          "uy_ruc",
          "uz_tin",
          "uz_vat",
          "ve_rif",
          "vn_tin",
          "zm_tin",
          "zw_tin",
          "sr_fin",
          "xi_vat"
        ],
        "type": "string"
      },
      "TaxTypes": {
        "description": "Whether or not the tax is included in a plan's price (or if it hasn't been set up)",
        "enum": [
          "inclusive",
          "exclusive",
          "unspecified"
        ],
        "type": "string"
      },
      "Topup": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "paid_at",
          "currency",
          "total",
          "failure_message"
        ],
        "type": "object"
      },
      "UploadStatuses": {
        "description": "The upload status of a file",
        "enum": [
          "pending",
          "processing",
          "ready",
          "failed"
        ],
        "type": "string"
      },
      "Verification": {
        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
        "properties": {
          "id": {
            "description": "The numeric id of the verification record.",
            "example": "verf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_error_code": {
            "description": "The most recent error code returned during verification. Null if no error has occurred.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationErrorCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_reason": {
            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
            "example": "Document image was too blurry to read.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatuses",
            "description": "The current status of this verification session."
          }
        },
        "required": [
          "id",
          "status",
          "last_error_code",
          "last_error_reason"
        ],
        "type": "object"
      },
      "VerificationErrorCodes": {
        "description": "An error code for a verification attempt.",
        "enum": [
          "abandoned",
          "consent_declined",
          "country_not_supported",
          "device_not_supported",
          "document_expired",
          "document_type_not_supported",
          "document_unverified_other",
          "email_unverified_other",
          "email_verification_declined",
          "id_number_insufficient_document_data",
          "id_number_mismatch",
          "id_number_unverified_other",
          "phone_unverified_other",
          "phone_verification_declined",
          "selfie_document_missing_photo",
          "selfie_face_mismatch",
          "selfie_manipulated",
          "selfie_unverified_other",
          "under_supported_age"
        ],
        "type": "string"
      },
      "VerificationListItem": {
        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
        "properties": {
          "id": {
            "description": "The numeric id of the verification record.",
            "example": "verf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_error_code": {
            "description": "The most recent error code returned during verification. Null if no error has occurred.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationErrorCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_reason": {
            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
            "example": "Document image was too blurry to read.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatuses",
            "description": "The current status of this verification session."
          }
        },
        "required": [
          "id",
          "status",
          "last_error_code",
          "last_error_reason"
        ],
        "type": "object"
      },
      "VerificationStatuses": {
        "description": "A status for a verification.",
        "enum": [
          "requires_input",
          "processing",
          "verified",
          "canceled",
          "created",
          "started",
          "submitted",
          "approved",
          "declined",
          "resubmission_requested",
          "expired",
          "abandoned",
          "review",
          "action_required",
          "manual_review"
        ],
        "type": "string"
      },
      "Visibility": {
        "description": "Visibility of a resource",
        "enum": [
          "visible",
          "hidden",
          "archived",
          "quick_link"
        ],
        "type": "string"
      },
      "VisibilityFilter": {
        "description": "The different levels of visibility for resources",
        "enum": [
          "visible",
          "hidden",
          "archived",
          "quick_link",
          "all",
          "not_quick_link",
          "not_archived"
        ],
        "type": "string"
      },
      "Webhook": {
        "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
        "properties": {
          "api_version": {
            "$ref": "#/components/schemas/ApiVersion",
            "description": "The API version used to format payloads sent to this webhook endpoint."
          },
          "api_version_date": {
            "description": "The dated API version (Api-Version-Date) that v1 payloads for this endpoint are pinned to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Null when unpinned — legacy (v2/v5) webhooks, and v1 webhooks on the legacy payload shape.",
            "type": [
              "string",
              "null"
            ]
          },
          "child_resource_events": {
            "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the webhook was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this webhook endpoint is currently active and receiving events.",
            "type": "boolean"
          },
          "events": {
            "description": "The list of event types this webhook is subscribed to.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the webhook.",
            "example": "hook_xxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The ID of the resource (company or product) this webhook is attached to.",
            "type": "string"
          },
          "testable_events": {
            "description": "The subset of subscribed event types that support sending test payloads.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "url": {
            "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
            "example": "https://example.com/path",
            "type": "string"
          },
          "webhook_secret": {
            "description": "The secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic. Returned on the create response and to interactive dashboard sessions; empty for API-key and OAuth callers on later reads.",
            "example": "whsec_abc123def456",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "enabled",
          "events",
          "api_version",
          "api_version_date",
          "created_at",
          "child_resource_events",
          "webhook_secret",
          "resource_id",
          "testable_events"
        ],
        "type": "object"
      },
      "WebhookEvent": {
        "description": "The different event types available",
        "enum": [
          "account.updated",
          "account.financing_approved",
          "account.financing_denied",
          "invoice.created",
          "invoice.marked_uncollectible",
          "invoice.paid",
          "invoice.past_due",
          "invoice.voided",
          "membership.activated",
          "membership.deactivated",
          "membership.trial_ending_soon",
          "entry.created",
          "entry.approved",
          "entry.denied",
          "entry.deleted",
          "export.completed",
          "export.failed",
          "setup_intent.requires_action",
          "setup_intent.succeeded",
          "setup_intent.canceled",
          "ledger_account.funds_available",
          "swap.completed",
          "deposit.succeeded",
          "transfer.created",
          "transfer.completed",
          "transfer.failed",
          "withdrawal.created",
          "withdrawal.updated",
          "withdrawal.reversed",
          "payout.created",
          "payout.updated",
          "payout.reversed",
          "card_transaction.created",
          "card_transaction.updated",
          "card_transaction.completed",
          "card_transaction.declined",
          "card_transaction.reversed",
          "card.created",
          "card.updated",
          "card.frozen",
          "card.canceled",
          "card_application.created",
          "card_application.updated",
          "card_application.approved",
          "card_application.denied",
          "course_lesson_interaction.completed",
          "payout_method.created",
          "verification.succeeded",
          "identity_profile.approved",
          "identity_profile.rejected",
          "identity_profile.needs_action",
          "identity_profile.updated",
          "payout_account.status_updated",
          "payment.authorized",
          "payment.canceled",
          "resolution_center_case.created",
          "resolution_center_case.updated",
          "resolution_center_case.decided",
          "product.created",
          "product.updated",
          "product.deleted",
          "product.published",
          "product.unpublished",
          "plan.created",
          "plan.updated",
          "plan.deleted",
          "shipment.created",
          "shipment.updated",
          "member.created",
          "ad_campaign.payment_failed",
          "ad_campaign.updated",
          "ad.updated",
          "chat.message.created",
          "chat.reaction.created",
          "payment.created",
          "payment.succeeded",
          "payment.failed",
          "payment.pending",
          "dispute.created",
          "dispute.updated",
          "refund.created",
          "refund.updated",
          "dispute_alert.created",
          "membership.cancel_at_period_end_changed"
        ],
        "type": "string"
      },
      "WebhookListItem": {
        "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
        "properties": {
          "api_version": {
            "$ref": "#/components/schemas/ApiVersion",
            "description": "The API version used to format payloads sent to this webhook endpoint."
          },
          "api_version_date": {
            "description": "The dated API version (Api-Version-Date) that v1 payloads for this endpoint are pinned to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Null when unpinned — legacy (v2/v5) webhooks, and v1 webhooks on the legacy payload shape.",
            "type": [
              "string",
              "null"
            ]
          },
          "child_resource_events": {
            "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the webhook was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this webhook endpoint is currently active and receiving events.",
            "type": "boolean"
          },
          "events": {
            "description": "The list of event types this webhook is subscribed to.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the webhook.",
            "example": "hook_xxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The ID of the resource (company or product) this webhook is attached to.",
            "type": "string"
          },
          "url": {
            "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
            "example": "https://example.com/path",
            "type": "string"
          },
          "webhook_secret": {
            "description": "The secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic. Returned on the create response and to interactive dashboard sessions; empty for API-key and OAuth callers on later reads.",
            "example": "whsec_abc123def456",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "enabled",
          "events",
          "api_version",
          "api_version_date",
          "created_at",
          "child_resource_events",
          "webhook_secret",
          "resource_id"
        ],
        "type": "object"
      },
      "WhoCanPostTypes": {
        "description": "Who can post on a chat feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "WhoCanReactTypes": {
        "description": "Who can react on a chat feed",
        "enum": [
          "everyone",
          "no_one"
        ],
        "type": "string"
      },
      "WorkforceBounty": {
        "description": "A privately accessible bounty.",
        "properties": {
          "bounty_type": {
            "$ref": "#/components/schemas/BountyTypes",
            "description": "The underlying bounty implementation type."
          },
          "created_at": {
            "description": "The datetime the bounty was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The currency used for the bounty funds."
          },
          "description": {
            "description": "The description of the bounty.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the bounty.",
            "example": "bnty_xxxxxxxxxxxxx",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Statuses",
            "description": "The current lifecycle status of the bounty."
          },
          "title": {
            "description": "The title of the bounty.",
            "type": "string"
          },
          "total_available": {
            "description": "The total amount currently funded in the bounty pool for payout.",
            "example": 6.9,
            "type": "number"
          },
          "total_paid": {
            "description": "The total amount paid out for this bounty.",
            "example": 6.9,
            "type": "number"
          },
          "updated_at": {
            "description": "The datetime the bounty was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "vote_threshold": {
            "description": "The number of watcher votes required before the submission can resolve.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "status",
          "total_available",
          "total_paid",
          "currency",
          "bounty_type",
          "vote_threshold",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "WorkforceBountyListItem": {
        "description": "A privately accessible bounty.",
        "properties": {
          "bounty_type": {
            "$ref": "#/components/schemas/BountyTypes",
            "description": "The underlying bounty implementation type."
          },
          "created_at": {
            "description": "The datetime the bounty was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The currency used for the bounty funds."
          },
          "description": {
            "description": "The description of the bounty.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the bounty.",
            "example": "bnty_xxxxxxxxxxxxx",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Statuses",
            "description": "The current lifecycle status of the bounty."
          },
          "title": {
            "description": "The title of the bounty.",
            "type": "string"
          },
          "total_available": {
            "description": "The total amount currently funded in the bounty pool for payout.",
            "example": 6.9,
            "type": "number"
          },
          "total_paid": {
            "description": "The total amount paid out for this bounty.",
            "example": 6.9,
            "type": "number"
          },
          "updated_at": {
            "description": "The datetime the bounty was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "vote_threshold": {
            "description": "The number of watcher votes required before the submission can resolve.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "status",
          "total_available",
          "total_paid",
          "currency",
          "bounty_type",
          "vote_threshold",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "auth-scheme",
        "description": "An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with `Bearer`, for example `Bearer ***************************`.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The Whop REST API. Please see https://docs.whop.com/developer/api/getting-started for more details.",
    "termsOfService": "https://whop.com/tos-developer-api/",
    "title": "Whop API",
    "version": "1.0.0",
    "x-api-version-date": "2026-09-06"
  },
  "openapi": "3.1.0",
  "paths": {
    "/access_tokens": {
      "post": {
        "description": "Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.",
        "operationId": "createAccessToken",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccessToken",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to generate the token for, starting with 'biz_'. The API key must have permission to access this company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expires_at": {
                    "description": "The expiration timestamp for the access token. Defaults to 1 hour from now, with a maximum of 3 hours.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scoped_actions": {
                    "description": "An array of permission scopes to grant to the access token. If empty or omitted, all permissions from the authenticating credential are inherited. Must be a subset of the credential's permissions.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to generate the token for, starting with 'user_'. The API key must have permission to access this user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessToken"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create access token",
        "tags": [
          "Access tokens"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst accessToken = await client.accessTokens.create();\n\nconsole.log(accessToken.token);"
          }
        ]
      }
    },
    "/account_links": {
      "post": {
        "description": "Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the KYC onboarding flow.",
        "operationId": "createAccountLink",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccountLink",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to generate the link for, starting with 'biz_'. Must be a sub-merchant of the API key's company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "refresh_url": {
                    "description": "The URL to redirect the user to if the session expires and needs to be re-authenticated, such as 'https://example.com/refresh'.",
                    "type": "string"
                  },
                  "return_url": {
                    "description": "The URL to redirect the user to when they want to return to your site, such as 'https://example.com/return'.",
                    "type": "string"
                  },
                  "use_case": {
                    "$ref": "#/components/schemas/AccountLinkUseCases",
                    "description": "The purpose of the account link, such as hosted payouts portal or hosted KYC onboarding."
                  }
                },
                "required": [
                  "account_id",
                  "refresh_url",
                  "return_url",
                  "use_case"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLink"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create account link",
        "tags": [
          "Account links"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst accountLink = await client.accountLinks.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  refresh_url: 'refresh_url',\n  return_url: 'return_url',\n  use_case: 'account_onboarding',\n});\n\nconsole.log(accountLink.expires_at);"
          }
        ]
      }
    },
    "/affiliates": {
      "get": {
        "description": "Returns a paginated list of affiliates for the actor in context, with optional filtering by status, search, and sorting.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "listAffiliate",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Defaults to descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AffiliatesSortableColumns",
              "description": "The field to sort results by."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search affiliates by username.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Status",
              "description": "Filter by affiliate status (active or archived)."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list affiliates for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Affiliate.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AffiliateListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:basic:read"
            ]
          }
        ],
        "summary": "List affiliates",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const affiliateListResponse of client.affiliates.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(affiliateListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates or finds an affiliate for a company and user.\n\nRequired permissions:\n - `affiliate:create`",
        "operationId": "createAffiliate",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAffiliateRecord",
                "properties": {
                  "account_id": {
                    "description": "The ID of the company to create the affiliate for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "user_identifier": {
                    "description": "The user identifier (username, email, user ID, or Discord ID).",
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "user_identifier"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Affiliate"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:create"
            ]
          }
        ],
        "summary": "Create affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst affiliate = await client.affiliates.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  user_identifier: 'user_identifier',\n});\n\nconsole.log(affiliate.id);"
          }
        ]
      }
    },
    "/affiliates/{id}": {
      "get": {
        "description": "Retrieves the details of an existing affiliate.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "retrieveAffiliate",
        "parameters": [
          {
            "description": "The unique identifier of the affiliate.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Affiliate"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:basic:read"
            ]
          }
        ],
        "summary": "Retrieve affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst affiliate = await client.affiliates.retrieve('aff_xxxxxxxxxxxxxx');\n\nconsole.log(affiliate.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/archive": {
      "post": {
        "description": "Archives an existing Affiliate\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "archiveAffiliate",
        "parameters": [
          {
            "description": "The internal ID of the affiliate to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:update"
            ]
          }
        ],
        "summary": "Archive affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.affiliates.archive('aff_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/affiliates/{id}/overrides": {
      "get": {
        "description": "Returns a paginated list of overrides for an affiliate.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "listOverridesAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "override_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AffiliateOverrideRoles",
              "description": "Filter by override type (standard or rev_share)."
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AffiliateOverride.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "A commission configuration for an affiliate, defining payout terms for a specific plan or revenue share",
                        "properties": {
                          "applies_to_payments": {
                            "description": "Whether the commission applies to the first payment only or all payments (standard overrides only).",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "applies_to_products": {
                            "description": "Whether this rev-share override applies to a single product or all products (rev-share only).",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/AffiliateAppliesToProducts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "checkout_direct_link": {
                            "description": "The checkout direct link for referrals (standard overrides only).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "commission_type": {
                            "$ref": "#/components/schemas/AffiliatePayoutTypes",
                            "description": "The type of commission (percentage or flat_fee)."
                          },
                          "commission_value": {
                            "description": "The commission amount. A percentage (1-100) when commission_type is percentage, or a dollar amount when flat_fee.",
                            "example": 6.9,
                            "type": "number"
                          },
                          "id": {
                            "description": "The unique identifier for the affiliate override.",
                            "example": "affov_xxxxxxxxxxxx",
                            "type": "string"
                          },
                          "override_type": {
                            "$ref": "#/components/schemas/AffiliateOverrideRoles",
                            "description": "The type of override (standard or rev_share)."
                          },
                          "plan_id": {
                            "description": "The plan ID (for standard overrides).",
                            "example": "plan_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "product_direct_link": {
                            "description": "The product page direct link for referrals (standard overrides only).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product ID (for rev-share overrides).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "revenue_basis": {
                            "description": "The revenue calculation basis (pre_fees or post_fees).",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/AffiliateRevenueBases"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "total_referral_earnings_usd": {
                            "description": "The total earnings paid to this affiliate for referrals to this specific plan, in USD.",
                            "example": 6.9,
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "override_type",
                          "commission_type",
                          "commission_value",
                          "applies_to_payments",
                          "plan_id",
                          "product_id",
                          "applies_to_products",
                          "revenue_basis",
                          "product_direct_link",
                          "checkout_direct_link",
                          "total_referral_earnings_usd"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:basic:read"
            ]
          }
        ],
        "summary": "List overrides",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const overrideListResponse of client.affiliates.overrides.list('aff_xxxxxxxxxxxxxx')) {\n  console.log(overrideListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a commission override for an affiliate.\n\nRequired permissions:\n - `affiliate:create`",
        "operationId": "createOverrideAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAffiliateOverride",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateAffiliateOverride",
                    "properties": {
                      "applies_to_payments": {
                        "description": "Whether commission applies to first payment or all payments (standard only).",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "commission_type": {
                        "description": "The commission type (percentage or flat_fee).",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/AffiliatePayoutTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "commission_value": {
                        "description": "The commission value (percentage 1-100 or flat fee).",
                        "example": 6.9,
                        "type": "number"
                      },
                      "id": {
                        "description": "The affiliate ID.",
                        "type": "string"
                      },
                      "override_type": {
                        "const": "standard",
                        "type": "string"
                      },
                      "plan_id": {
                        "description": "The plan ID (required for standard overrides).",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "commission_value",
                      "id",
                      "override_type",
                      "plan_id"
                    ],
                    "title": "CreateAffiliateOverrideInputOverrideTypeStandard",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateAffiliateOverride",
                    "properties": {
                      "commission_type": {
                        "description": "The commission type (percentage or flat_fee).",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/AffiliatePayoutTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "commission_value": {
                        "description": "The commission value (percentage 1-100 or flat fee).",
                        "example": 6.9,
                        "type": "number"
                      },
                      "id": {
                        "description": "The affiliate ID.",
                        "type": "string"
                      },
                      "override_type": {
                        "const": "rev_share",
                        "type": "string"
                      },
                      "product_id": {
                        "description": "The product ID (for rev-share overrides, omit for company-wide).",
                        "example": "prod_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "revenue_basis": {
                        "description": "The revenue calculation basis for rev-share overrides. Defaults to post_fees.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/AffiliateRevenueBases"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "commission_value",
                      "id",
                      "override_type"
                    ],
                    "title": "CreateAffiliateOverrideInputOverrideTypeRevShare",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A commission configuration for an affiliate, defining payout terms for a specific plan or revenue share",
                  "properties": {
                    "applies_to_payments": {
                      "description": "Whether the commission applies to the first payment only or all payments (standard overrides only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "applies_to_products": {
                      "description": "Whether this rev-share override applies to a single product or all products (rev-share only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToProducts"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkout_direct_link": {
                      "description": "The checkout direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "commission_type": {
                      "$ref": "#/components/schemas/AffiliatePayoutTypes",
                      "description": "The type of commission (percentage or flat_fee)."
                    },
                    "commission_value": {
                      "description": "The commission amount. A percentage (1-100) when commission_type is percentage, or a dollar amount when flat_fee.",
                      "example": 6.9,
                      "type": "number"
                    },
                    "id": {
                      "description": "The unique identifier for the affiliate override.",
                      "example": "affov_xxxxxxxxxxxx",
                      "type": "string"
                    },
                    "override_type": {
                      "$ref": "#/components/schemas/AffiliateOverrideRoles",
                      "description": "The type of override (standard or rev_share)."
                    },
                    "plan_id": {
                      "description": "The plan ID (for standard overrides).",
                      "example": "plan_xxxxxxxxxxxxx",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_direct_link": {
                      "description": "The product page direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_id": {
                      "description": "The product ID (for rev-share overrides).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revenue_basis": {
                      "description": "The revenue calculation basis (pre_fees or post_fees).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateRevenueBases"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "total_referral_earnings_usd": {
                      "description": "The total earnings paid to this affiliate for referrals to this specific plan, in USD.",
                      "example": 6.9,
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "override_type",
                    "commission_type",
                    "commission_value",
                    "applies_to_payments",
                    "plan_id",
                    "product_id",
                    "applies_to_products",
                    "revenue_basis",
                    "product_direct_link",
                    "checkout_direct_link",
                    "total_referral_earnings_usd"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:create"
            ]
          }
        ],
        "summary": "Create override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.create('aff_xxxxxxxxxxxxxx', {\n  id: 'id',\n  commission_value: 6.9,\n  override_type: 'standard',\n  plan_id: 'plan_xxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/overrides/{override_id}": {
      "delete": {
        "description": "Deletes an affiliate override.\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "deleteOverrideAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "description": "The override ID.",
            "in": "path",
            "name": "override_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:update"
            ]
          }
        ],
        "summary": "Delete override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.delete('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of a specific affiliate override.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "retrieveOverrideAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "description": "The override ID.",
            "in": "path",
            "name": "override_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A commission configuration for an affiliate, defining payout terms for a specific plan or revenue share",
                  "properties": {
                    "applies_to_payments": {
                      "description": "Whether the commission applies to the first payment only or all payments (standard overrides only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "applies_to_products": {
                      "description": "Whether this rev-share override applies to a single product or all products (rev-share only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToProducts"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkout_direct_link": {
                      "description": "The checkout direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "commission_type": {
                      "$ref": "#/components/schemas/AffiliatePayoutTypes",
                      "description": "The type of commission (percentage or flat_fee)."
                    },
                    "commission_value": {
                      "description": "The commission amount. A percentage (1-100) when commission_type is percentage, or a dollar amount when flat_fee.",
                      "example": 6.9,
                      "type": "number"
                    },
                    "id": {
                      "description": "The unique identifier for the affiliate override.",
                      "example": "affov_xxxxxxxxxxxx",
                      "type": "string"
                    },
                    "override_type": {
                      "$ref": "#/components/schemas/AffiliateOverrideRoles",
                      "description": "The type of override (standard or rev_share)."
                    },
                    "plan_id": {
                      "description": "The plan ID (for standard overrides).",
                      "example": "plan_xxxxxxxxxxxxx",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_direct_link": {
                      "description": "The product page direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_id": {
                      "description": "The product ID (for rev-share overrides).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revenue_basis": {
                      "description": "The revenue calculation basis (pre_fees or post_fees).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateRevenueBases"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "total_referral_earnings_usd": {
                      "description": "The total earnings paid to this affiliate for referrals to this specific plan, in USD.",
                      "example": 6.9,
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "override_type",
                    "commission_type",
                    "commission_value",
                    "applies_to_payments",
                    "plan_id",
                    "product_id",
                    "applies_to_products",
                    "revenue_basis",
                    "product_direct_link",
                    "checkout_direct_link",
                    "total_referral_earnings_usd"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:basic:read"
            ]
          }
        ],
        "summary": "Retrieve override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.retrieve('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      },
      "patch": {
        "description": "Updates an existing affiliate override.\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "updateOverrideAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "description": "The override ID.",
            "in": "path",
            "name": "override_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAffiliateOverride",
                "properties": {
                  "applies_to_payments": {
                    "description": "Whether commission applies to first payment or all payments (standard only).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "commission_type": {
                    "description": "The commission type (percentage or flat_fee).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AffiliatePayoutTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "commission_value": {
                    "description": "The commission value (percentage 1-100 or flat fee in dollars).",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "revenue_basis": {
                    "description": "The revenue calculation basis (rev-share only).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AffiliateRevenueBases"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A commission configuration for an affiliate, defining payout terms for a specific plan or revenue share",
                  "properties": {
                    "applies_to_payments": {
                      "description": "Whether the commission applies to the first payment only or all payments (standard overrides only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToPayments"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "applies_to_products": {
                      "description": "Whether this rev-share override applies to a single product or all products (rev-share only).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateAppliesToProducts"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checkout_direct_link": {
                      "description": "The checkout direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "commission_type": {
                      "$ref": "#/components/schemas/AffiliatePayoutTypes",
                      "description": "The type of commission (percentage or flat_fee)."
                    },
                    "commission_value": {
                      "description": "The commission amount. A percentage (1-100) when commission_type is percentage, or a dollar amount when flat_fee.",
                      "example": 6.9,
                      "type": "number"
                    },
                    "id": {
                      "description": "The unique identifier for the affiliate override.",
                      "example": "affov_xxxxxxxxxxxx",
                      "type": "string"
                    },
                    "override_type": {
                      "$ref": "#/components/schemas/AffiliateOverrideRoles",
                      "description": "The type of override (standard or rev_share)."
                    },
                    "plan_id": {
                      "description": "The plan ID (for standard overrides).",
                      "example": "plan_xxxxxxxxxxxxx",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_direct_link": {
                      "description": "The product page direct link for referrals (standard overrides only).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "product_id": {
                      "description": "The product ID (for rev-share overrides).",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revenue_basis": {
                      "description": "The revenue calculation basis (pre_fees or post_fees).",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/AffiliateRevenueBases"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "total_referral_earnings_usd": {
                      "description": "The total earnings paid to this affiliate for referrals to this specific plan, in USD.",
                      "example": 6.9,
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "override_type",
                    "commission_type",
                    "commission_value",
                    "applies_to_payments",
                    "plan_id",
                    "product_id",
                    "applies_to_products",
                    "revenue_basis",
                    "product_direct_link",
                    "checkout_direct_link",
                    "total_referral_earnings_usd"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:update"
            ]
          }
        ],
        "summary": "Update override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.update('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/unarchive": {
      "post": {
        "description": "Unarchives an existing Affiliate\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "unarchiveAffiliate",
        "parameters": [
          {
            "description": "The internal ID of the affiliate to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "affiliate:update"
            ]
          }
        ],
        "summary": "Unarchive affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.affiliates.unarchive('aff_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/ai_chats": {
      "get": {
        "description": "Returns a paginated list of AI chat threads for the current authenticated user.",
        "operationId": "listAiChat",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "agent_identifier",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AiChatAgentIdentifiers",
              "description": "Only return chats handled by this agent."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "only_active_crons",
            "required": false,
            "schema": {
              "description": "When true, returns only chats with an active cron schedule",
              "type": "boolean"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AiChat.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AiChatListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List ai chats",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const aiChatListResponse of client.aiChats.list()) {\n  console.log(aiChatListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new AI chat thread and send the first message to the AI agent.\n\nRequired permissions:\n - `ai_chat:create`",
        "operationId": "createAiChat",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAiChat",
                "properties": {
                  "agent_identifier": {
                    "description": "The AI agent that handles the chat. Defaults to `support`.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AiChatAgentIdentifiers"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "current_account_id": {
                    "description": "The unique identifier of the account to set as context for the AI chat (e.g., \"biz_XXXXX\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "message_attachments": {
                    "description": "A list of previously uploaded file attachments to include with the first message.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "message_source": {
                    "description": "The source of the message.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AiChatMessageSourceTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message_text": {
                    "description": "The text content of the first message to send to the AI agent.",
                    "type": "string"
                  },
                  "suggestion_type": {
                    "description": "The type of suggestion prompt that was clicked, when message_source is 'suggestion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "An optional display title for the AI chat thread (e.g., \"Help with billing\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "message_text"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ai_chat:create"
            ]
          }
        ],
        "summary": "Create ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.create({ message_text: 'message_text' });\n\nconsole.log(aiChat.id);"
          }
        ]
      }
    },
    "/ai_chats/{id}": {
      "delete": {
        "description": "Delete an AI chat thread so it no longer appears in the user's chat list.\n\nRequired permissions:\n - `ai_chat:delete`",
        "operationId": "deleteAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to delete (e.g., \"ai_chat_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ai_chat:delete"
            ]
          }
        ],
        "summary": "Delete ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.delete('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing AI chat.",
        "operationId": "retrieveAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Retrieve ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.retrieve('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat.id);"
          }
        ]
      },
      "patch": {
        "description": "Update an AI chat's title, notification preferences, or associated account context.\n\nRequired permissions:\n - `ai_chat:update`",
        "operationId": "updateAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to update (e.g., \"ai_chat_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAiChat",
                "properties": {
                  "current_account_id": {
                    "description": "The unique identifier of the account to set as context for the AI chat (e.g., \"biz_XXXXX\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notification_preference": {
                    "description": "The notification preference for the AI chat.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AiChatNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "description": "The new display title for the AI chat thread (e.g., \"Help with billing\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ai_chat:update"
            ]
          }
        ],
        "summary": "Update ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.update('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat.id);"
          }
        ]
      }
    },
    "/app_builds": {
      "get": {
        "description": "Returns a paginated list of build artifacts for a given app, with optional filtering by platform, status, and creation date.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "listAppBuild",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "app_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the app to list builds for.",
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppBuildPlatforms",
              "description": "Filter builds by target platform."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppBuildStatuses",
              "description": "Filter builds by review status."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return builds created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return builds created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AppBuild.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AppBuildListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "List app builds",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const appBuild of client.appBuilds.list({ app_id: 'app_id' })) {\n  console.log(appBuild.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Upload a new build artifact for an app. The build must include a compiled code bundle for the specified platform.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "createAppBuild",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAppBuild",
                "properties": {
                  "ai_prompt_id": {
                    "description": "The identifier of the AI prompt that generated this build, if applicable.",
                    "example": "prmt_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "app_id": {
                    "description": "The unique identifier of the app to create the build for. Defaults to the app associated with the current API key.",
                    "example": "app_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "attachment": {
                    "description": "The build file to upload. For iOS and Android, this should be a .zip archive containing a main_js_bundle.hbc file and an optional assets folder. For web, this should be a JavaScript file or a .zip archive of the hosted site.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": "object"
                  },
                  "checksum": {
                    "description": "A client-generated checksum of the build file, used to verify file integrity when unpacked on a device.",
                    "type": "string"
                  },
                  "platform": {
                    "$ref": "#/components/schemas/AppBuildPlatforms",
                    "description": "The target platform for the build. Accepted values: ios, android, web."
                  },
                  "source_attachment": {
                    "description": "An optional compressed archive (.zip or .gz) of the source code that produced this build, stored alongside the build so it can be downloaded later.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "supported_app_view_types": {
                    "description": "The view types this build supports. A build can support multiple view types but should only list the ones its code implements.",
                    "items": {
                      "$ref": "#/components/schemas/AppViewTypes"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "attachment",
                  "checksum",
                  "platform"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Create app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.create({\n  attachment: {},\n  checksum: 'xxxxxxxxxxxxxxx',\n  platform: 'web',\n});\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/app_builds/{id}": {
      "get": {
        "description": "Retrieves the details of an existing app build.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "retrieveAppBuild",
        "parameters": [
          {
            "description": "The unique identifier of the app build to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "apbu_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Retrieve app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.retrieve('id');\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/app_builds/{id}/promote": {
      "post": {
        "description": "Promote an approved or draft app build to production so it becomes the active version served to users.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "promoteAppBuild",
        "parameters": [
          {
            "description": "The unique identifier of the app build to promote to production, starting with 'abld_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "apbu_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Promote app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.promote('id');\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/apps": {
      "get": {
        "description": "Returns a paginated list of apps on the Whop platform, with optional filtering by company, type, view support, and search query.",
        "operationId": "listApp",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "app_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppTypes",
              "description": "Filter apps by the type of end-user they are built for, such as consumer or business."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Accepted values: asc, desc."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppOrder",
              "description": "The field to sort apps by. Defaults to discoverable_at descending, showing the most recently published apps first."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "A search string to filter apps by name, such as 'chat' or 'analytics'.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "verified_apps_only",
            "required": false,
            "schema": {
              "description": "Whether to only return apps that have been verified by Whop. Useful for populating a featured apps section.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "view_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AppViewTypes",
              "description": "Filter apps to only those supporting a specific view type, such as 'dashboard' or 'hub'."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Filter apps to only those created by this company, starting with 'biz_'.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicApp.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AppListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List apps",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const appListResponse of client.apps.list()) {\n  console.log(appListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Register a new app on the Whop developer platform. Apps provide custom experiences that can be added to products.\n\nRequired permissions:\n - `developer:create_app`\n - `developer:manage_api_key`\n - `developer:basic:read`\n - `developer:update_app`",
        "operationId": "createApp",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateApp",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create the app for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "base_url": {
                    "description": "The base production URL where the app is hosted, such as 'https://myapp.example.com'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "icon": {
                    "description": "The icon image for the app in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name for the app, shown to users on the app store and product pages.",
                    "type": "string"
                  },
                  "redirect_uris": {
                    "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The unique subdomain route where the app's hosted web builds are served, such as 'myapp' for myapp.whop.site.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "account_id",
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:create_app",
              "developer:manage_api_key",
              "developer:basic:read",
              "developer:update_app"
            ]
          }
        ],
        "summary": "Create app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst app = await client.apps.create({ name: 'Shine Time Booking' });\n\nconsole.log(app.id);"
          }
        ]
      }
    },
    "/apps/{app_id}/permissions": {
      "patch": {
        "description": "Updates the permission requirements for an app\n\nRequired permissions:\n - `developer:update_app_authorization`",
        "operationId": "updatePermissionsApp",
        "parameters": [
          {
            "description": "The ID of the app the permission requirements are being updated for",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAppPermissionRequirements",
                "properties": {
                  "requested_permissions": {
                    "description": "The permissions that the app will request off of users when a user installs the app.",
                    "items": {
                      "description": "Input for creating a requested permission",
                      "properties": {
                        "action": {
                          "description": "The action that the app will request off of users when a user installs the app.",
                          "type": "string"
                        },
                        "is_required": {
                          "description": "Whether the action is required for the app to function.",
                          "type": "boolean"
                        },
                        "justification": {
                          "description": "The reason for requesting the action.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "action",
                        "is_required",
                        "justification"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "requested_permissions"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:update_app_authorization"
            ]
          }
        ],
        "summary": "Update requested permissions",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer"
      }
    },
    "/apps/{id}": {
      "get": {
        "description": "Retrieves the details of an existing app.\n\nRequired permissions:\n - `developer:manage_api_key`\n - `developer:basic:read`\n - `developer:update_app`",
        "operationId": "retrieveApp",
        "parameters": [
          {
            "description": "The unique identifier of the app to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_api_key",
              "developer:basic:read",
              "developer:update_app"
            ]
          }
        ],
        "summary": "Retrieve app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop();\n\nconst app = await client.apps.retrieve('id');\n\nconsole.log(app.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the settings, metadata, or status of an existing app on the Whop developer platform.\n\nRequired permissions:\n - `developer:update_app`\n - `developer:manage_api_key`\n - `developer:basic:read`",
        "operationId": "updateApp",
        "parameters": [
          {
            "description": "The unique identifier of the app to update, starting with 'app_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateApp",
                "properties": {
                  "app_store_description": {
                    "description": "The detailed description shown on the app store's in-depth app view page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "app_type": {
                    "description": "The type of end-user the app is built for, such as consumer or business.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "base_url": {
                    "description": "The base production URL where the app is hosted. Pass null to take the app proxy offline.",
                    "example": "https://example.com/path",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "dashboard_path": {
                    "description": "The URL path for the company dashboard view of the app, such as '/dashboard'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A short description of the app shown in listings and search results.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "discover_path": {
                    "description": "The URL path for the discover view of the app, such as '/discover'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_path": {
                    "description": "The URL path for the member-facing hub view of the app, such as '/experiences/[experienceId]'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "icon": {
                    "description": "The icon image for the app, used in listings and navigation.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name for the app, shown to users on the app store and product pages.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "oauth_client_type": {
                    "description": "How this app authenticates at the OAuth token endpoint.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppOauthClientTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openapi_path": {
                    "description": "The URL path to the OpenAPI spec file of the app, such as '/assets/openapi.json'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_uris": {
                    "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "required_scopes": {
                    "description": "The permission scopes the app will request from users when they install it.",
                    "items": {
                      "$ref": "#/components/schemas/AppValidScopes"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The unique subdomain route where the app's hosted web builds are served, such as 'myapp' for myapp.whop.site.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "secrets": {
                    "additionalProperties": true,
                    "description": "Secrets to add or overwrite on the app, as an object of string values (e.g. {\"MAIL_API_KEY\": \"...\"}). Keys not included are left untouched. Pass null or an empty string as the value to delete a secret. Secrets are encrypted at rest and injected into the app's hosted server runtime as environment bindings.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "skills_path": {
                    "description": "The URL path to the skills directory of the app, such as '/assets/skills/'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "description": "Controls the app's visibility. Set to 'live' to publish on Whop discovery (requires name, icon, and description). Set to 'unlisted' to hide from discovery while keeping the app accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:update_app",
              "developer:manage_api_key",
              "developer:basic:read"
            ]
          }
        ],
        "summary": "Update app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst app = await client.apps.update('id');\n\nconsole.log(app.id);"
          }
        ]
      }
    },
    "/authorized_users": {
      "get": {
        "description": "Returns a paginated list of authorized team members for a company, with optional filtering by user, role, and creation date.\n\nRequired permissions:\n - `company:authorized_user:read`\n - `member:email:read`",
        "operationId": "listAuthorizedUser",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter results to a specific user to check if they are an authorized team member.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuthorizedUserRoles",
              "description": "Filter authorized users by their assigned role within the company."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return authorized users created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return authorized users created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list authorized users for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AuthorizedUser.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AuthorizedUserListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:authorized_user:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List authorized users",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const authorizedUserListResponse of client.authorizedUsers.list()) {\n  console.log(authorizedUserListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add a new authorized user to a company.\n\nRequired permissions:\n - `authorized_user:create`\n - `member:email:read`",
        "operationId": "createAuthorizedUser",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAuthorizedUser",
                "properties": {
                  "account_id": {
                    "description": "The ID of the company to add the authorized user to.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "elevation": {
                    "description": "Re-authentication proof required to perform this sensitive action.",
                    "properties": {
                      "authenticator_data": {
                        "description": "The WebAuthn authenticator data (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "client_data_json": {
                        "description": "The WebAuthn client data JSON (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "credential_id": {
                        "description": "The WebAuthn credential ID (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_code": {
                        "description": "The 6-digit code emailed to the user.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "signature": {
                        "description": "The WebAuthn signature (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "totp_code": {
                        "description": "The 6-digit code from the authenticator app or SMS.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "use_finance_session": {
                        "description": "Reuse an existing elevated session (for SMS/email 2FA users).",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "role": {
                    "$ref": "#/components/schemas/GrantableAuthorizedUserRoles",
                    "description": "The role to assign to the authorized user within the company. Supported roles: 'moderator', 'sales_manager'."
                  },
                  "send_emails": {
                    "description": "Whether to send notification emails to the user on creation.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The ID of the user to add as an authorized user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "role",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizedUser"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "authorized_user:create",
              "member:email:read"
            ]
          }
        ],
        "summary": "Create authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  role: 'owner',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(authorizedUser.id);"
          }
        ]
      }
    },
    "/authorized_users/{id}": {
      "delete": {
        "description": "Remove an authorized user from a company.\n\nRequired permissions:\n - `authorized_user:delete`",
        "operationId": "deleteAuthorizedUser",
        "parameters": [
          {
            "description": "The ID of the authorized user or user to remove.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ausr_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The ID of the company the authorized user belongs to. Optional if the authorized user ID is provided.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "authorized_user:delete"
            ]
          }
        ],
        "summary": "Delete authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.delete('ausr_xxxxxxxxxxxxx');\n\nconsole.log(authorizedUser);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing authorized user.\n\nRequired permissions:\n - `company:authorized_user:read`\n - `member:email:read`",
        "operationId": "retrieveAuthorizedUser",
        "parameters": [
          {
            "description": "The unique identifier of the authorized user to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ausr_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizedUser"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:authorized_user:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.retrieve('ausr_xxxxxxxxxxxxx');\n\nconsole.log(authorizedUser.id);"
          }
        ]
      }
    },
    "/bounties": {
      "get": {
        "description": "Returns a paginated list of workforce bounties. When experienceId is provided, returns bounties scoped to that experience. When omitted, returns bounties with no experience.",
        "operationId": "listBounty",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": false,
            "schema": {
              "description": "The experience to list bounties for. When omitted, returns bounties with no experience.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Statuses",
              "description": "Filter bounties by status."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "Sort direction. Defaults to descending."
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Bounty.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/WorkforceBountyListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List bounties",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const bountyListItem of client.bounties.list()) {\n  console.log(bountyListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new workforce bounty by funding a dedicated bounty pool.\n\nRequired permissions:\n - `bounty:create`",
        "operationId": "createBounty",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateWorkforceBounty",
                "properties": {
                  "accepted_submissions_limit": {
                    "description": "The number of submissions that can be approved before the bounty closes. Defaults to 1. The total pool (base_unit_amount times this limit) must be at least 5 in the bounty's currency.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "allowed_country_codes": {
                    "description": "The ISO3166 country codes where this bounty should be visible. Empty means globally visible.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "base_unit_amount": {
                    "description": "The amount paid to each approved submission. The total bounty pool funded is this amount times accepted_submissions_limit, and must be at least 5 in the bounty's currency.",
                    "example": 6.9,
                    "type": "number"
                  },
                  "business_goal_type": {
                    "description": "What the poster is trying to accomplish with this bounty. Product taxonomy, distinct from the implementation type.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BusinessGoalTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The currency for the bounty pool funding amount."
                  },
                  "description": {
                    "description": "The description of the bounty.",
                    "type": "string"
                  },
                  "experience_id": {
                    "description": "An optional experience to scope the bounty to.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "minimum_total_verified_clip_duration_seconds": {
                    "description": "Data capture bounties only: the minimum total server-verified clip duration in seconds. Defaults to 3600 and must be a whole number of hours between 1 and 12.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "origin_account_id": {
                    "description": "The user (user_*) or company (biz_*) tag whose balance funds this bounty pool. Defaults to the requester's personal balance when omitted. The requester must be the user themself or an owner/admin of the company.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "post_markdown_content": {
                    "description": "Optional markdown body for the anchor forum post. Falls back to the bounty description when omitted.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "post_title": {
                    "description": "Optional title for the anchor forum post. Falls back to the bounty title when omitted.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheduled_frequency": {
                    "description": "How often a scheduled bounty republishes. Only applies when scheduled_publish_at is provided.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ScheduleFrequencies"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scheduled_publish_at": {
                    "description": "When to publish the bounty. When provided, the bounty is created as a hidden draft and published at this time instead of immediately. Must be in the future.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheduled_timezone": {
                    "description": "The IANA timezone used for recurring occurrences. Required when scheduled_publish_at is provided.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The title of the bounty.",
                    "type": "string"
                  }
                },
                "required": [
                  "base_unit_amount",
                  "currency",
                  "description",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkforceBounty"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "bounty:create"
            ]
          }
        ],
        "summary": "Create bounty",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.create({\n  description:\n    'Record one continuous pass of a full interior detail, dash to trunk, on a customer vehicle.',\n  gross_reward_amount: 40,\n  title: 'Record interior detailing passes',\n});\n\nconsole.log(bounty.id);"
          }
        ]
      }
    },
    "/bounties/{id}": {
      "get": {
        "description": "Retrieves a workforce bounty for the current authenticated user.",
        "operationId": "retrieveBounty",
        "parameters": [
          {
            "description": "The unique identifier of the workforce bounty to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "bnty_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkforceBounty"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Retrieve bounty",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.retrieve('id');\n\nconsole.log(bounty.id);"
          }
        ]
      }
    },
    "/card_transactions": {
      "get": {
        "description": "Returns a paginated list of card transactions for a company.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "listCardTransaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "card_id",
            "required": false,
            "schema": {
              "description": "Filter transactions to a specific card.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return transactions created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return transactions created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "Sort direction for results."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CardIssuingTransactionStatus",
              "description": "Filter by transaction lifecycle status."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The company to list card transactions for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicCardTransaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CardTransactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "List card transactions",
        "tags": [
          "Card transactions"
        ],
        "x-group-title": "Cards",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const cardTransaction of client.cardTransactions.list()) {\n  console.log(cardTransaction.id);\n}"
          }
        ]
      }
    },
    "/card_transactions/{id}": {
      "get": {
        "description": "Retrieves a single card transaction by ID.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrieveCardTransaction",
        "parameters": [
          {
            "description": "The card transaction ID (citx_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardTransaction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve card transaction",
        "tags": [
          "Card transactions"
        ],
        "x-group-title": "Cards",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst cardTransaction = await client.cardTransactions.retrieve('id');\n\nconsole.log(cardTransaction.id);"
          }
        ]
      }
    },
    "/chat_channels": {
      "get": {
        "description": "Returns a paginated list of chat channels within a specific company, with optional filtering by product.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "listChatChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a product to filter by. When set, only chat channels connected to this product are returned.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list chat channels for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ChatFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ChatChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          }
        ],
        "summary": "List chat channels",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatChannelListResponse of client.chatChannels.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(chatChannelListResponse.id);\n}"
          }
        ]
      }
    },
    "/chat_channels/{id}": {
      "get": {
        "description": "Retrieves the details of an existing chat channel.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "retrieveChatChannel",
        "parameters": [
          {
            "description": "The unique identifier of the chat channel or experience to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          }
        ],
        "summary": "Retrieve chat channel",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatChannel = await client.chatChannels.retrieve('id');\n\nconsole.log(chatChannel.id);"
          }
        ]
      },
      "patch": {
        "description": "Update moderation settings for a chat channel, such as who can post, banned words, and media restrictions.\n\nRequired permissions:\n - `chat:moderate`",
        "operationId": "updateChatChannel",
        "parameters": [
          {
            "description": "The unique identifier of the chat channel to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a chat channel ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateChatChannel",
                "properties": {
                  "ban_media": {
                    "description": "Whether media uploads such as images and videos are banned in this chat channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "ban_urls": {
                    "description": "Whether URLs and links are banned from being posted in this chat channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "banned_words": {
                    "description": "A list of words that are automatically blocked from messages in this chat channel. For example, ['spam', 'scam'].",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "user_posts_cooldown_seconds": {
                    "description": "The minimum number of seconds a user must wait between sending messages in this chat channel.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "who_can_post": {
                    "description": "Controls which roles are allowed to send messages in this chat channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WhoCanPostTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_react": {
                    "description": "Controls which roles are allowed to add reactions to messages in this chat channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WhoCanReactTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:moderate"
            ]
          }
        ],
        "summary": "Update chat channel",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatChannel = await client.chatChannels.update('id');\n\nconsole.log(chatChannel.id);"
          }
        ]
      }
    },
    "/checkout_configurations": {
      "get": {
        "description": "Returns a paginated list of checkout configurations for a company, with optional filtering by plan and creation date.\n\nRequired permissions:\n - `checkout_configuration:basic:read`",
        "operationId": "listCheckoutConfiguration",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_id",
            "required": false,
            "schema": {
              "description": "Filter checkout configurations to only those associated with this plan identifier.",
              "example": "plan_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return checkout configurations created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return checkout configurations created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list checkout configurations for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CheckoutSession.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CheckoutConfigurationListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "List checkout configurations",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list({\n  account_id: 'account_id',\n})) {\n  console.log(checkoutConfigurationListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a new checkout configuration\n\nRequired permissions:\n - `checkout_configuration:create`\n - `plan:create`\n - `access_pass:create`\n - `access_pass:update`\n - `checkout_configuration:basic:read`",
        "operationId": "createCheckoutConfiguration",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCheckoutSession",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "affiliate_code": {
                        "description": "An affiliate tracking code to attribute the checkout to a specific affiliate.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "payment",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes to create a new plan inline for this checkout configuration.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "application_fee_amount": {
                            "description": "The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "company_id": {
                            "description": "The company the plan should be created for.",
                            "example": "biz_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The respective currency identifier for the plan."
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires (for expiration-based plans). For example, 365 for a one-year access pass.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "force_create_new_plan": {
                            "description": "Whether to force the creation of a new plan even if one with the same attributes already exists.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "image": {
                            "description": "An image for the plan. This will be visible on the product page to customers.",
                            "properties": {
                              "id": {
                                "description": "The ID of an existing file object.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "title": "FileInputWithId",
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Provided as a number in dollars (e.g., 10.00 for $10.00).",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "override_tax_type": {
                            "description": "An override for tax to specify for this specific plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "product": {
                            "description": "Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.",
                            "properties": {
                              "collect_shipping_address": {
                                "description": "Whether or not to collect shipping information at checkout from the customer.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "custom_statement_descriptor": {
                                "description": "The custom statement descriptor for the product i.e. WHOP*SPORTS, must be between 5 and 22 characters, contain at least one letter, and not contain any of the following characters: <, >, \\, ', \"",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "A written description of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_identifier": {
                                "description": "A unique ID used to find or create a product. When provided during creation, we will look for an existing product with this external identifier — if found, it will be updated; otherwise, a new product will be created.",
                                "type": "string"
                              },
                              "global_affiliate_percentage": {
                                "description": "The percentage of the revenue that goes to the global affiliate program.",
                                "example": 6.9,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "global_affiliate_status": {
                                "description": "The status of the global affiliate program for this product.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headline": {
                                "description": "The headline of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_tax_code_id": {
                                "description": "The ID of the product tax code to apply to this product.",
                                "example": "ptc_xxxxxxxxxxxxxx",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect_purchase_url": {
                                "description": "The URL to redirect the customer to after a purchase.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "route": {
                                "description": "The route of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "The title of the product.",
                                "type": "string"
                              },
                              "visibility": {
                                "description": "This product will/will not be displayed publicly - default hidden.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/Visibility"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "external_identifier",
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product the plan is related to. Either this or product is required.",
                            "example": "prod_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Provided as a number in dollars (e.g., 9.99 for $9.99/period).",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "split_pay_required_payments": {
                            "description": "The number of payments required before pausing the subscription.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase. If not provided, stock is unlimited.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the plan. This will be visible on the product page to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "company_id",
                          "currency"
                        ],
                        "type": "object"
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "plan"
                    ],
                    "title": "CreateCheckoutSessionInputModePaymentWithPlan",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "affiliate_code": {
                        "description": "An affiliate tracking code to attribute the checkout to a specific affiliate.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "payment",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan_id": {
                        "description": "The unique identifier of an existing plan to use for this checkout configuration.",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "plan_id"
                    ],
                    "title": "CreateCheckoutSessionInputModePaymentWithPlanId",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create the checkout configuration for. Only required in setup mode.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "setup",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "three_ds_level": {
                        "description": "The 3D Secure behavior to apply when collecting a payment method. Only applies to setup mode; in payment mode the plan's 3D Secure behavior is used.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanThreeDsLevels"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "mode",
                      "account_id"
                    ],
                    "title": "CreateCheckoutSessionInputModeSetup",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutConfiguration"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "checkout_configuration:create",
              "plan:create",
              "access_pass:create",
              "access_pass:update",
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "Create checkout configuration",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst checkoutConfiguration = await client.checkoutConfigurations.create();\n\nconsole.log(checkoutConfiguration.id);"
          }
        ]
      }
    },
    "/checkout_configurations/{id}": {
      "get": {
        "description": "Retrieves the details of an existing checkout configuration.\n\nRequired permissions:\n - `checkout_configuration:basic:read`",
        "operationId": "retrieveCheckoutConfiguration",
        "parameters": [
          {
            "description": "The unique identifier of the checkout configuration.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ch_xxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutConfiguration"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "Retrieve checkout configuration",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop();\n\nconst checkoutConfiguration = await client.checkoutConfigurations.retrieve('id');\n\nconsole.log(checkoutConfiguration.id);"
          }
        ]
      }
    },
    "/company_token_transactions": {
      "get": {
        "description": "Returns a paginated list of token transactions for a user or company, depending on the authenticated actor, with optional filtering by user and transaction type.\n\nRequired permissions:\n - `company_token_transaction:read`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "listCompanyTokenTransaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter transactions to only those involving this specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "transaction_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CompanyTokenTransactionTypes",
              "description": "Filter transactions by type."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list token transactions for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CompanyTokenTransaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CompanyTokenTransactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company_token_transaction:read",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "List company token transactions",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const companyTokenTransactionListResponse of client.companyTokenTransactions.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(companyTokenTransactionListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a token transaction to add, subtract, or transfer tokens for a member within a company.\n\nRequired permissions:\n - `company_token_transaction:create`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "createCompanyTokenTransaction",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCompanyTokenTransaction",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "destination_user_id": {
                        "description": "The unique identifier of the user receiving the tokens. Required when the transaction type is 'transfer'.",
                        "type": "string"
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "transfer",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "account_id",
                      "transaction_type",
                      "user_id",
                      "destination_user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeTransfer",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "add",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "account_id",
                      "transaction_type",
                      "user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeAdd",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "subtract",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "account_id",
                      "transaction_type",
                      "user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeSubtract",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTokenTransaction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company_token_transaction:create",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Create company token transaction",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst companyTokenTransaction = await client.companyTokenTransactions.create({\n  amount: 6.9,\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  destination_user_id: 'destination_user_id',\n  transaction_type: 'transfer',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(companyTokenTransaction.id);"
          }
        ]
      }
    },
    "/company_token_transactions/{id}": {
      "get": {
        "description": "Retrieves the details of an existing company token transaction.\n\nRequired permissions:\n - `company_token_transaction:read`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "retrieveCompanyTokenTransaction",
        "parameters": [
          {
            "description": "The unique identifier of the token transaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTokenTransaction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company_token_transaction:read",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Retrieve company token transaction",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst companyTokenTransaction = await client.companyTokenTransactions.retrieve('id');\n\nconsole.log(companyTokenTransaction.id);"
          }
        ]
      }
    },
    "/course_chapters": {
      "get": {
        "description": "Returns a paginated list of chapters within a course, ordered by position.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourseChapter",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the course to list chapters for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Chapter.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseChapterListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "List course chapters",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseChapterListResponse of client.courseChapters.list({\n  course_id: 'cors_xxxxxxxxxxxxx',\n})) {\n  console.log(courseChapterListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new chapter within a course to organize lessons into sections.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourseChapter",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateChapter",
                "properties": {
                  "course_id": {
                    "description": "The unique identifier of the course to create the chapter in (e.g., \"course_XXXXX\").",
                    "example": "cors_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "title": {
                    "description": "The display title of the chapter (e.g., \"Module 1: Introduction\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "course_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.create({ course_id: 'cors_xxxxxxxxxxxxx' });\n\nconsole.log(courseChapter.id);"
          }
        ]
      }
    },
    "/course_chapters/{id}": {
      "delete": {
        "description": "Permanently delete a chapter and all of its lessons from a course.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to delete (e.g., \"chap_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.delete('chap_xxxxxxxxxxxxx');\n\nconsole.log(courseChapter);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course chapter.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.retrieve('chap_xxxxxxxxxxxxx');\n\nconsole.log(courseChapter.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a chapter's title within a course.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to update (e.g., \"chap_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateChapter",
                "properties": {
                  "title": {
                    "description": "The new display title of the chapter (e.g., \"Module 1: Introduction\").",
                    "type": "string"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.update('chap_xxxxxxxxxxxxx', { title: 'title' });\n\nconsole.log(courseChapter.id);"
          }
        ]
      }
    },
    "/course_lesson_interactions": {
      "get": {
        "description": "Returns a paginated list of lesson interactions, filtered by lesson, course, user, or completion status.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "listCourseLessonInteraction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the user to filter lesson interactions for.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "lesson_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the lesson to filter interactions for.",
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the course to filter interactions for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "completed",
            "required": false,
            "schema": {
              "description": "Whether to filter for completed or in-progress lesson interactions.",
              "type": "boolean"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for LessonInteraction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseLessonInteractionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "List course lesson interactions",
        "tags": [
          "Course lesson interactions"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseLessonInteractionListItem of client.courseLessonInteractions.list()) {\n  console.log(courseLessonInteractionListItem.id);\n}"
          }
        ]
      }
    },
    "/course_lesson_interactions/{id}": {
      "get": {
        "description": "Retrieves the details of an existing course lesson interaction.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "retrieveCourseLessonInteraction",
        "parameters": [
          {
            "description": "The unique identifier of the lesson interaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "crsli_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLessonInteraction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "Retrieve course lesson interaction",
        "tags": [
          "Course lesson interactions"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseLessonInteraction = await client.courseLessonInteractions.retrieve(\n  'crsli_xxxxxxxxxxxx',\n);\n\nconsole.log(courseLessonInteraction.id);"
          }
        ]
      }
    },
    "/course_lessons": {
      "get": {
        "description": "Returns a paginated list of lessons within a course or chapter, ordered by position.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourseLesson",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the course to return all lessons across all chapters.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "chapter_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a chapter to return only its lessons.",
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Lesson.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseLessonListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "List course lessons",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseLessonListResponse of client.courseLessons.list()) {\n  console.log(courseLessonListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new lesson within a course chapter. Lessons can contain video, text, or assessment content.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourseLesson",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateLesson",
                "properties": {
                  "chapter_id": {
                    "description": "The unique identifier of the chapter to create the lesson in (e.g., \"chap_XXXXX\").",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "content": {
                    "description": "The Markdown content body of the lesson.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "days_from_course_start_until_unlock": {
                    "description": "The number of days after a student starts the course before this lesson becomes accessible.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "embed_id": {
                    "description": "The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed_type": {
                    "description": "The type of video embed for this lesson, such as YouTube or Loom.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EmbedTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lesson_type": {
                    "$ref": "#/components/schemas/LessonTypes",
                    "description": "The content type of the lesson, such as video, text, quiz, or knowledge check."
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the lesson in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the lesson (e.g., \"Getting Started with APIs\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "chapter_id",
                  "lesson_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.create({\n  chapter_id: 'chap_xxxxxxxxxxxxx',\n  lesson_type: 'text',\n});\n\nconsole.log(lesson.id);"
          }
        ]
      }
    },
    "/course_lessons/{id}": {
      "delete": {
        "description": "Permanently delete a lesson and remove it from its chapter.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to delete (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseLesson = await client.courseLessons.delete('lesn_xxxxxxxxxxxxx');\n\nconsole.log(courseLesson);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course lesson.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.retrieve('lesn_xxxxxxxxxxxxx');\n\nconsole.log(lesson.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a lesson's content, type, visibility, assessment questions, or media attachments.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to update (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateLesson",
                "properties": {
                  "assessment_completion_requirement": {
                    "description": "The passing criteria for quiz or knowledge check lessons, such as minimum grade or correct answers.",
                    "properties": {
                      "minimum_grade_percent": {
                        "description": "The minimum grade percentage required to pass (0-100). Cannot be set together with minimum_questions_correct.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "minimum_questions_correct": {
                        "description": "The minimum number of questions that must be answered correctly. Cannot be set together with minimum_grade_percent.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "assessment_questions": {
                    "description": "The full list of assessment questions for quiz or knowledge check lessons. Replaces all existing questions.",
                    "items": {
                      "description": "Input for creating or updating an assessment question",
                      "properties": {
                        "correct_answer": {
                          "description": "The correct answer for the question. Used for short answer questions",
                          "type": "string"
                        },
                        "id": {
                          "description": "The ID of an existing question. If provided, the question will be updated. If not provided, a new question will be created.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "image": {
                          "description": "Optional image attachment for the question",
                          "properties": {
                            "id": {
                              "description": "The ID of an existing file object.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "title": "FileInputWithId",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "options": {
                          "description": "The answer options for multiple choice/select questions",
                          "items": {
                            "description": "Input for creating or updating an assessment question option",
                            "properties": {
                              "id": {
                                "description": "The ID of an existing option. If provided, the option will be updated. If not provided, a new option will be created.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "is_correct": {
                                "description": "Whether this option is a correct answer",
                                "type": "boolean"
                              },
                              "option_text": {
                                "description": "The text of the answer option",
                                "type": "string"
                              }
                            },
                            "required": [
                              "is_correct",
                              "option_text"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "question_text": {
                          "description": "The text of the question",
                          "type": "string"
                        },
                        "question_type": {
                          "$ref": "#/components/schemas/CoursesAssessmentQuestionTypes",
                          "description": "The type of the question"
                        }
                      },
                      "required": [
                        "correct_answer",
                        "question_text",
                        "question_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "attachments": {
                    "description": "File attachments for the lesson such as PDFs or documents. Replaces all existing attachments.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The Markdown content body of the lesson.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "days_from_course_start_until_unlock": {
                    "description": "The number of days after a student starts the course before this lesson becomes accessible.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "embed_id": {
                    "description": "The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed_type": {
                    "description": "The type of video embed for this lesson, such as YouTube or Loom.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EmbedTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lesson_type": {
                    "description": "The content type of the lesson, such as video, text, quiz, or knowledge check.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LessonTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "main_pdf": {
                    "description": "The primary PDF document attached to this lesson for student reference.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "max_attempts": {
                    "description": "The maximum number of attempts a student is allowed for assessment lessons.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "mux_asset_id": {
                    "description": "The identifier of a Mux video asset to attach to this lesson (e.g., \"mux_XXXXX\").",
                    "example": "mux_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the lesson in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the lesson (e.g., \"Getting Started with APIs\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls whether this lesson is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LessonVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.update('lesn_xxxxxxxxxxxxx');\n\nconsole.log(lesson.id);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/mark_as_completed": {
      "post": {
        "description": "Mark a lesson as completed for the current user after they finish the content.",
        "operationId": "markAsCompletedCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to mark as completed (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Mark as completed course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.markAsCompleted('lesson_id');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/start": {
      "post": {
        "description": "Record that the current user has started viewing a lesson, creating progress tracking records.",
        "operationId": "startCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson the user is starting (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.start('lesson_id');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/submit_assessment": {
      "post": {
        "description": "Submit answers for a quiz or knowledge check lesson and receive a graded result.",
        "operationId": "submitAssessmentCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the quiz or knowledge check lesson to submit answers for (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for SubmitAssessment",
                "properties": {
                  "answers": {
                    "description": "The list of answers to submit for each assessment question.",
                    "items": {
                      "description": "Input for a single question's answer in an assessment submission",
                      "properties": {
                        "answer_text": {
                          "description": "The text answer provided by the user (for short answer questions)",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "question_id": {
                          "description": "The ID of the question being answered",
                          "type": "string"
                        },
                        "selected_option_ids": {
                          "description": "The IDs of the selected options (for multiple choice/select questions)",
                          "items": {
                            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "question_id"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "answers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The result of a user's assessment attempt",
                  "properties": {
                    "created_at": {
                      "description": "The datetime the assessment result was created.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "id": {
                      "description": "The unique identifier for the assessment result.",
                      "example": "crsar_xxxxxxxxxxxx",
                      "type": "string"
                    },
                    "lesson": {
                      "description": "The lesson this assessment result is for",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the lesson.",
                          "example": "lesn_xxxxxxxxxxxxx",
                          "type": "string"
                        },
                        "title": {
                          "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                          "example": "Understanding Candlestick Patterns",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "type": "object"
                    },
                    "result_correct": {
                      "description": "The number of correct answers",
                      "example": 42,
                      "type": "integer"
                    },
                    "result_grade": {
                      "description": "The grade achieved on the assessment",
                      "example": 6.9,
                      "type": "number"
                    },
                    "result_graded_questions": {
                      "additionalProperties": true,
                      "description": "Array of graded questions with details",
                      "type": "object"
                    },
                    "result_passing_grade": {
                      "description": "Whether the user achieved a passing grade",
                      "type": "boolean"
                    },
                    "result_question_count": {
                      "description": "The total number of questions in the assessment",
                      "example": 42,
                      "type": "integer"
                    },
                    "score_percent": {
                      "description": "The percentage score achieved on the assessment",
                      "example": 6.9,
                      "type": "number"
                    },
                    "updated_at": {
                      "description": "The datetime the assessment result was last updated.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "user": {
                      "description": "The user who took the assessment",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the user.",
                          "example": "user_xxxxxxxxxxxxx",
                          "type": "string"
                        },
                        "name": {
                          "description": "The user's display name shown on their public profile.",
                          "example": "John Doe",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "username": {
                          "description": "The user's unique username shown on their public profile.",
                          "example": "johndoe42",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "username"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "created_at",
                    "updated_at",
                    "result_grade",
                    "result_correct",
                    "result_question_count",
                    "result_passing_grade",
                    "result_graded_questions",
                    "score_percent",
                    "user",
                    "lesson"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Submit assessment course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.submitAssessment('lesson_id', {\n  answers: [{ question_id: 'question_id' }],\n});\n\nconsole.log(response.id);"
          }
        ]
      }
    },
    "/course_students": {
      "get": {
        "description": "Returns a paginated list of students enrolled in a course, with optional name filtering.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "listCourseStudent",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the course to list enrolled students for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "keyword",
            "required": false,
            "schema": {
              "description": "A search term to filter students by name or username.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CourseStudentType.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseStudentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "List course students",
        "tags": [
          "Course students"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseStudentListResponse of client.courseStudents.list({\n  course_id: 'cors_xxxxxxxxxxxxx',\n})) {\n  console.log(courseStudentListResponse.id);\n}"
          }
        ]
      }
    },
    "/course_students/{id}": {
      "get": {
        "description": "Retrieves the details of an existing course student.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "retrieveCourseStudent",
        "parameters": [
          {
            "description": "The unique identifier of the course student record to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseStudent"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "Retrieve course student",
        "tags": [
          "Course students"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseStudent = await client.courseStudents.retrieve('id');\n\nconsole.log(courseStudent.id);"
          }
        ]
      }
    },
    "/courses": {
      "get": {
        "description": "Returns a paginated list of courses, filtered by either an experience or a company.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourse",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the experience to list courses for.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list courses for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Course.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "List courses",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseListResponse of client.courses.list()) {\n  console.log(courseListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new course within an experience, with optional chapters, lessons, and a certificate.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourse",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCourse",
                "properties": {
                  "certificate_after_completion_enabled": {
                    "description": "Whether the course awards students a PDF certificate after completing all lessons.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "experience_id": {
                    "description": "The unique identifier of the experience to create the course in (e.g., \"exp_XXXXX\").",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "order": {
                    "description": "The decimal order position of the course within its experience. Use fractional values (e.g., \"1.5\") to place between existing courses.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_completing_lessons_in_order": {
                    "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "tagline": {
                    "description": "A short tagline displayed beneath the course title (e.g., \"Master the fundamentals of design\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the course in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the course (e.g., \"Introduction to Web Development\").",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Controls whether this course is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CourseVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "experience_id",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.create({ experience_id: 'exp_xxxxxxxxxxxxxx', title: 'title' });\n\nconsole.log(course.id);"
          }
        ]
      }
    },
    "/courses/{id}": {
      "delete": {
        "description": "Permanently delete a course and all of its chapters, lessons, and student progress.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to delete (e.g., \"course_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.delete('cors_xxxxxxxxxxxxx');\n\nconsole.log(course);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.retrieve('cors_xxxxxxxxxxxxx');\n\nconsole.log(course.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a course's title, description, visibility, thumbnail, or chapter ordering.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to update (e.g., \"course_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateCourse",
                "properties": {
                  "certificate_after_completion_enabled": {
                    "description": "Whether the course awards students a PDF certificate after completing all lessons.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "chapters": {
                    "description": "A list of chapters with nested lessons to reorder or rename in bulk.",
                    "items": {
                      "description": "Input for updating a chapter while updating a course",
                      "properties": {
                        "id": {
                          "description": "The ID of the chapter to update",
                          "type": "string"
                        },
                        "lessons": {
                          "description": "The lessons to update within this chapter",
                          "items": {
                            "description": "Input for updating a lesson while updating a course",
                            "properties": {
                              "chapter_id": {
                                "description": "The ID of the chapter this lesson belongs to (for moving between chapters)",
                                "example": "chap_xxxxxxxxxxxxx",
                                "type": "string"
                              },
                              "id": {
                                "description": "The ID of the lesson to update",
                                "type": "string"
                              },
                              "order": {
                                "description": "The order of the lesson within its chapter",
                                "example": 42,
                                "type": "integer"
                              },
                              "title": {
                                "description": "The title of the lesson",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chapter_id",
                              "id",
                              "order",
                              "title"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "order": {
                          "description": "The order of the chapter within its course",
                          "example": 42,
                          "type": "integer"
                        },
                        "title": {
                          "description": "The title of the chapter",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "order",
                        "title"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A short description of the course displayed to students on the course page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "language": {
                    "description": "The primary language spoken in the video content of the course.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Languages"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "order": {
                    "description": "The decimal order position of the course within its experience. Use fractional values (e.g., \"1.5\") to place between existing courses.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_completing_lessons_in_order": {
                    "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "tagline": {
                    "description": "A short tagline displayed beneath the course title (e.g., \"Master the fundamentals of design\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the course in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the course (e.g., \"Introduction to Web Development\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls whether this course is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CourseVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.update('cors_xxxxxxxxxxxxx');\n\nconsole.log(course.id);"
          }
        ]
      }
    },
    "/dispute_alerts": {
      "get": {
        "description": "Returns a paginated list of dispute alerts for a company, with optional filtering by creation date.\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `payment:dispute:read`",
        "operationId": "listDisputeAlert",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return dispute alerts created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return dispute alerts created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list dispute alerts for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DisputeAlert.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DisputeAlertListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute_alert:read",
              "payment:basic:read",
              "payment:dispute:read"
            ]
          }
        ],
        "summary": "List dispute alerts",
        "tags": [
          "Dispute alerts"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const disputeAlert of client.disputeAlerts.list()) {\n  console.log(disputeAlert.id);\n}"
          }
        ]
      }
    },
    "/dispute_alerts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing dispute alert.\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `payment:dispute:read`",
        "operationId": "retrieveDisputeAlert",
        "parameters": [
          {
            "description": "The unique identifier of the dispute alert.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspa_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisputeAlert"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute_alert:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "payment:dispute:read"
            ]
          }
        ],
        "summary": "Retrieve dispute alert",
        "tags": [
          "Dispute alerts"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst disputeAlert = await client.disputeAlerts.retrieve('id');\n\nconsole.log(disputeAlert.id);"
          }
        ]
      }
    },
    "/disputes": {
      "get": {
        "description": "Returns a paginated list of disputes for a company, with optional filtering by creation date. A dispute represents a chargeback or inquiry filed by a customer against a payment.\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`",
        "operationId": "listDispute",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return disputes created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return disputes created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list disputes for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Dispute.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DisputeListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List disputes",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dispute of client.disputes.list()) {\n  console.log(dispute.id);\n}"
          }
        ]
      }
    },
    "/disputes/{id}": {
      "get": {
        "description": "Retrieves the details of an existing dispute.\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "retrieveDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve dispute",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dispute = await client.disputes.retrieve('id');\n\nconsole.log(dispute.id);"
          }
        ]
      }
    },
    "/disputes/{id}/submit_evidence": {
      "post": {
        "description": "Submit a payment dispute to the payment processor for review. Once submitted, no further edits can be made.\n\nRequired permissions:\n - `payment:dispute`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "submitEvidenceDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute to submit to the payment processor for review.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Submit evidence",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins"
      }
    },
    "/disputes/{id}/update_evidence": {
      "post": {
        "description": "Update a dispute with evidence data to attempt to win the dispute.\n\nRequired permissions:\n - `payment:dispute`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "updateEvidenceDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDispute",
                "properties": {
                  "access_activity_log": {
                    "description": "An IP access activity log showing the customer used the service.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "billing_address": {
                    "description": "The billing address associated with the customer's payment method.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cancellation_policy_attachment": {
                    "description": "A file upload containing the company's cancellation policy document.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "cancellation_policy_disclosure": {
                    "description": "The company's cancellation policy text to submit as evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_communication_attachment": {
                    "description": "A file upload containing evidence of customer communication. Must be a JPEG, PNG, GIF, or PDF.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "customer_email_address": {
                    "description": "The email address of the customer associated with the disputed payment.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_name": {
                    "description": "The full name of the customer associated with the disputed payment.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notes": {
                    "description": "Additional notes or context to submit as part of the dispute evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "product_description": {
                    "description": "A description of the product or service that was provided to the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "refund_policy_attachment": {
                    "description": "A file upload containing the company's refund policy document.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "refund_policy_disclosure": {
                    "description": "The company's refund policy text to submit as evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "refund_refusal_explanation": {
                    "description": "An explanation of why the refund request was refused.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "service_date": {
                    "description": "The date when the product or service was delivered to the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "uncategorized_attachment": {
                    "description": "A file upload for evidence that does not fit into the other categories.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:dispute",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Update evidence",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins"
      }
    },
    "/dm_channels": {
      "get": {
        "description": "Returns a paginated list of DM channels for the currently authenticated user, sorted by most recently active.\n\nRequired permissions:\n - `dms:read`",
        "operationId": "listDmChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a company to filter DM channels by. Only returns channels scoped to this company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DmChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          }
        ],
        "summary": "List dm channels",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dmChannelListResponse of client.dmChannels.list()) {\n  console.log(dmChannelListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new DM channel between two or more users, optionally scoped to a specific company. Returns the existing channel if one already exists.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "createDmChannel",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateDmChannelV2",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to scope this DM channel to. When set, the channel is visible only within that company context.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_name": {
                    "description": "A custom display name for the DM channel. For example, 'Project Discussion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notifications_enabled": {
                    "description": "Whether Whop app notifications are enabled for this direct message channel. Webhooks still fire.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "with_user_ids": {
                    "description": "The list of user identifiers to include in the DM channel. Each entry can be an email, username, or user ID (e.g. 'user_xxxxx').",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "with_user_ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Create dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.create({ with_user_ids: ['string'] });\n\nconsole.log(dmChannel.id);"
          }
        ]
      }
    },
    "/dm_channels/{id}": {
      "delete": {
        "description": "Permanently delete a DM channel and all of its messages. Only an admin of the channel can perform this action.\n\nRequired permissions (one of):\n - `dms:channel:manage`\n - `support_chat:create`",
        "operationId": "deleteDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:channel:manage"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:create"
            ]
          }
        ],
        "summary": "Delete dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.delete('id');\n\nconsole.log(dmChannel);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing DM channel.\n\nRequired permissions (one of):\n - `dms:read`\n - `support_chat:read`",
        "operationId": "retrieveDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.retrieve('id');\n\nconsole.log(dmChannel.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the settings of an existing DM channel, such as its display name. Only an admin of the channel can perform this action.\n\nRequired permissions (one of):\n - `dms:channel:manage`\n - `support_chat:create`",
        "operationId": "updateDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDmChannel",
                "properties": {
                  "custom_name": {
                    "description": "A new custom display name for the DM channel. For example, 'Project Discussion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:channel:manage"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:create"
            ]
          }
        ],
        "summary": "Update dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.update('id');\n\nconsole.log(dmChannel.id);"
          }
        ]
      }
    },
    "/dm_members": {
      "get": {
        "description": "Returns a paginated list of members in a specific DM channel, sorted by the date they were added.\n\nRequired permissions (one of):\n - `dms:read`\n - `support_chat:read`",
        "operationId": "listDmMember",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "channel_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the DM channel to list members for.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeedMember.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DmMemberListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "List dm members",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dmMemberListResponse of client.dmMembers.list({ channel_id: 'channel_id' })) {\n  console.log(dmMemberListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add a new user to an existing DM channel. Only an admin of the channel can add members.\n\nRequired permissions (one of):\n - `dms:message:manage`\n - `support_chat:message:create`",
        "operationId": "createDmMember",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateDmMember",
                "properties": {
                  "channel_id": {
                    "description": "The unique identifier of the DM channel to add the new member to.",
                    "type": "string"
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to add to the DM channel. For example, 'user_xxxxx'.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "channel_id",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:message:manage"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:message:create"
            ]
          }
        ],
        "summary": "Create dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.create({\n  channel_id: 'channel_id',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(dmMember.id);"
          }
        ]
      }
    },
    "/dm_members/{id}": {
      "delete": {
        "description": "Remove a user from a DM channel. An admin can remove any member, and a member can remove themselves.\n\nRequired permissions (one of):\n - `dms:read`\n - `support_chat:read`",
        "operationId": "deleteDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to remove.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Delete dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.delete('id');\n\nconsole.log(dmMember);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing DM member.\n\nRequired permissions (one of):\n - `dms:read`\n - `support_chat:read`",
        "operationId": "retrieveDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.retrieve('id');\n\nconsole.log(dmMember.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a DM channel member's settings, such as their notification preferences or membership status.\n\nRequired permissions (one of):\n - `dms:read`\n - `support_chat:read`",
        "operationId": "updateDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDmMember",
                "properties": {
                  "notification_preference": {
                    "description": "The notification setting for this member, controlling how they receive alerts for new messages in this channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/DmsFeedMemberNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "description": "The membership status for this member in the DM channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/DmsFeedMemberStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Update dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.update('id');\n\nconsole.log(dmMember.id);"
          }
        ]
      }
    },
    "/entries": {
      "get": {
        "description": "Returns a paginated list of waitlist entries for a company, with optional filtering by product, plan, status, and creation date.\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`",
        "operationId": "listEntry",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Defaults to descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EntriesSortableColumns",
              "description": "The column to sort waitlist entries by. Defaults to creation date."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter entries to only those for specific products.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter entries to only those for specific plans.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter entries by their current status.",
              "items": {
                "$ref": "#/components/schemas/EntryStatus"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return entries created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return entries created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list waitlist entries for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicEntry.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/EntryListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "plan:waitlist:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List entries",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const entryListResponse of client.entries.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(entryListResponse.id);\n}"
          }
        ]
      }
    },
    "/entries/{id}": {
      "get": {
        "description": "Retrieves the details of an existing waitlist entry.\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`",
        "operationId": "retrieveEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "plan:waitlist:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst entry = await client.entries.retrieve('entry_xxxxxxxxxxxx');\n\nconsole.log(entry.id);"
          }
        ]
      }
    },
    "/entries/{id}/approve": {
      "post": {
        "description": "Approve a pending waitlist entry, triggering the checkout process to grant the user access to the plan.\n\nRequired permissions:\n - `plan:waitlist:manage`",
        "operationId": "approveEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to approve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "An object representing an asynchronous job.",
                  "properties": {
                    "job_id": {
                      "description": "The ID of the job.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "job_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "plan:waitlist:manage"
            ]
          }
        ],
        "summary": "Approve entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.entries.approve('entry_xxxxxxxxxxxx');\n\nconsole.log(response.job_id);"
          }
        ]
      }
    },
    "/entries/{id}/deny": {
      "post": {
        "description": "Deny a pending waitlist entry, preventing the user from gaining access to the plan.\n\nRequired permissions:\n - `plan:waitlist:manage`\n - `plan:basic:read`\n - `member:email:read`",
        "operationId": "denyEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to deny.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "plan:waitlist:manage",
              "plan:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Deny entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst entry = await client.entries.deny('entry_xxxxxxxxxxxx');\n\nconsole.log(entry.id);"
          }
        ]
      }
    },
    "/experiences": {
      "get": {
        "description": "Returns a paginated list of experiences belonging to a company, with optional filtering by product and app.",
        "operationId": "listExperience",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "Filter to only experiences attached to this product identifier.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "app_id",
            "required": false,
            "schema": {
              "description": "Filter to only experiences powered by this app identifier.",
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return experiences created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return experiences created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list experiences for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicExperience.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ExperienceListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List experiences",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const experienceListResponse of client.experiences.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(experienceListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Required permissions:\n - `experience:create`",
        "operationId": "createExperience",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateExperience",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create this experience for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "app_id": {
                    "description": "The unique identifier of the app that powers this experience.",
                    "example": "app_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "is_public": {
                    "description": "Whether the experience is publicly accessible without a membership.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "A logo image displayed alongside the experience name.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name of the experience. Defaults to the app's name if not provided.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notifications_enabled": {
                    "description": "Whether Whop app notifications are enabled for this experience. Webhooks still fire.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "section_id": {
                    "description": "The unique identifier of the section to place the experience in.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "app_id",
                  "account_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:create"
            ]
          }
        ],
        "summary": "Create experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.create({\n  app_id: 'app_xxxxxxxxxxxxxx',\n  company_id: 'biz_xxxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}": {
      "delete": {
        "description": "Required permissions:\n - `experience:delete`",
        "operationId": "deleteExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:delete"
            ]
          }
        ],
        "summary": "Delete experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.delete('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing experience.",
        "operationId": "retrieveExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Retrieve experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.retrieve('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      },
      "patch": {
        "description": "Required permissions:\n - `experience:update`",
        "operationId": "updateExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateExperience",
                "properties": {
                  "access_level": {
                    "description": "The access level of the experience.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ExperienceAccessLevels"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_public": {
                    "description": "Whether the experience is publicly accessible without a membership.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "A logo image displayed alongside the experience name.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name of the experience.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notifications_enabled": {
                    "description": "Whether Whop app notifications are enabled for this experience. Webhooks still fire.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "order": {
                    "description": "The position of the experience within its section for display ordering.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "section_id": {
                    "description": "The unique identifier of the section to move the experience into.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:update"
            ]
          }
        ],
        "summary": "Update experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.update('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/attach": {
      "post": {
        "description": "Attach an experience to a product, making it accessible to the product's customers.\n\nRequired permissions:\n - `experience:attach`",
        "operationId": "attachExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to attach.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for AddExperienceToAccessPass",
                "properties": {
                  "product_id": {
                    "description": "The unique identifier of the product to attach the experience to.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:attach"
            ]
          }
        ],
        "summary": "Attach experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.attach('exp_xxxxxxxxxxxxxx', {\n  product_id: 'prod_xxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/detach": {
      "post": {
        "description": "Detach an experience from a product, removing customer access to it through that product.\n\nRequired permissions:\n - `experience:detach`",
        "operationId": "detachExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to detach.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for RemoveExperienceFromAccessPass",
                "properties": {
                  "product_id": {
                    "description": "The unique identifier of the product to detach the experience from.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:detach"
            ]
          }
        ],
        "summary": "Detach experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.detach('exp_xxxxxxxxxxxxxx', {\n  product_id: 'prod_xxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/duplicate": {
      "post": {
        "description": "Duplicates an existing experience. The name will be copied, unless provided. The new experience will be attached to the same products as the original experience.\nIf duplicating a Forum or Chat experience, the new experience will have the same settings as the original experience, e.g. who can post, who can comment, etc.\nNo content, e.g. posts, messages, lessons from within the original experience will be copied.\n\n\nRequired permissions:\n - `experience:create`",
        "operationId": "duplicateExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to duplicate.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for DuplicateExperience",
                "properties": {
                  "name": {
                    "description": "The display name for the duplicated experience. Defaults to the original experience's name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "experience:create"
            ]
          }
        ],
        "summary": "Duplicate experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.duplicate('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/fee_markups": {
      "get": {
        "description": "Returns a paginated list of fee markups configured for a company. If the company is a platform account, returns the platform default markups.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "listFeeMarkup",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list fee markups for. Pass a platform account identifier to retrieve platform default markups.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for FeeMarkup.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/FeeMarkupListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "List fee markups",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const feeMarkupListResponse of client.feeMarkups.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(feeMarkupListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create or update a fee markup for a company. If a markup for the specified fee type already exists, it will be updated with the new values.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "createFeeMarkup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateFeeMarkup",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create or update the fee markup for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "fee_type": {
                    "$ref": "#/components/schemas/FeeMarkupTypes",
                    "description": "The type of fee this markup applies to, such as processing or platform fees."
                  },
                  "fixed_fee_usd": {
                    "description": "The fixed fee amount in USD to charge per transaction. Must be between 0 and 50.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value metadata to attach to this fee markup.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "notes": {
                    "description": "Internal notes about this fee markup for record-keeping purposes.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "percentage_fee": {
                    "description": "The percentage fee to charge per transaction. Must be between 0 and 25.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "account_id",
                  "fee_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeMarkup"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "Create fee markup",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst feeMarkup = await client.feeMarkups.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  fee_type: 'crypto_withdrawal_markup',\n});\n\nconsole.log(feeMarkup.id);"
          }
        ]
      }
    },
    "/fee_markups/{id}": {
      "delete": {
        "description": "Delete a fee markup configuration for a company. This removes the custom fee override and reverts to the parent company's default fees.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "deleteFeeMarkup",
        "parameters": [
          {
            "description": "The unique identifier of the fee markup to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "Delete fee markup",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst feeMarkup = await client.feeMarkups.delete('id');\n\nconsole.log(feeMarkup);"
          }
        ]
      }
    },
    "/files": {
      "post": {
        "description": "Create a new file record and receive a presigned URL for uploading content to S3.",
        "operationId": "createFile",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateFile",
                "properties": {
                  "filename": {
                    "description": "The name of the file including its extension (e.g., \"photo.png\" or \"document.pdf\").",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/FileVisibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "filename"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A file that has been uploaded or is pending upload.",
                  "properties": {
                    "content_type": {
                      "description": "The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg).",
                      "example": "image/jpeg",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filename": {
                      "description": "The original filename of the uploaded file, including its file extension.",
                      "example": "document.pdf",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "The unique identifier for the file.",
                      "example": "file_xxxxxxxxxxxxx",
                      "type": "string"
                    },
                    "size": {
                      "description": "The file size in bytes. Null if the file has not finished uploading.",
                      "example": "123.45",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "upload_headers": {
                      "additionalProperties": true,
                      "description": "Headers to include in the upload request. Only present in the response from the create mutation.",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "upload_status": {
                      "$ref": "#/components/schemas/UploadStatuses",
                      "description": "The current upload status of the file (e.g., pending, ready)."
                    },
                    "upload_url": {
                      "description": "The presigned URL to upload the file contents to. Only present in the response from the create mutation.",
                      "example": "https://media.whop.com/uploads/presigned",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "description": "The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visibility": {
                      "$ref": "#/components/schemas/FileVisibility",
                      "description": "Whether the file is publicly accessible or requires authentication."
                    }
                  },
                  "required": [
                    "id",
                    "upload_status",
                    "filename",
                    "content_type",
                    "size",
                    "url",
                    "visibility",
                    "upload_url",
                    "upload_headers"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create file",
        "tags": [
          "Files"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.create({ filename: 'filename' });\n\nconsole.log(file.id);"
          }
        ]
      }
    },
    "/files/{id}": {
      "get": {
        "description": "Retrieves the details of an existing file.",
        "operationId": "retrieveFile",
        "parameters": [
          {
            "description": "The unique identifier of the file to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "file_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Retrieve file",
        "tags": [
          "Files"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.retrieve('file_xxxxxxxxxxxxx');\n\nconsole.log(file.id);"
          }
        ]
      }
    },
    "/forum_posts": {
      "get": {
        "description": "Returns a paginated list of forum posts within a specific experience, with optional filtering by parent post or pinned status.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "listForumPost",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the experience to list forum posts for.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "include_bounty_anchors",
            "required": false,
            "schema": {
              "description": "Whether to include top-level bounty discussion anchors as rich forum items.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a parent post to list comments for. When set, returns replies to that post.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "pinned",
            "required": false,
            "schema": {
              "description": "Whether to filter for only pinned posts. Set to true to return only pinned posts.",
              "type": "boolean"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ForumPost.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ForumPostListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:read"
            ]
          }
        ],
        "summary": "List forum posts",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const forumPostListResponse of client.forumPosts.list({\n  experience_id: 'exp_xxxxxxxxxxxxxx',\n})) {\n  console.log(forumPostListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. Pass experience_id 'public' with an account_id to post to an account's public forum.\n\nRequired permissions:\n - `forum:post:create`",
        "operationId": "createForumPost",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateForumPostV2",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company whose public forum to post in. Required when experience_id is 'public'. For example, 'biz_xxxxx'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "attachments": {
                    "description": "A list of file attachments to include with the post, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The main body of the post in Markdown format. For example, 'Check out this **update**'. Hidden if the post is paywalled and the viewer has not purchased access.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_id": {
                    "description": "The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with account_id to automatically use the account's public forum.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "is_mention": {
                    "description": "Whether to send this post as a mention notification to all users in the experience who have mentions enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "parent_id": {
                    "description": "The unique identifier of the parent post to comment on. Omit this field to create a top-level post.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "paywall_amount": {
                    "description": "The price to unlock this post in the specified paywall currency. For example, 5.00 for $5.00. When set, users must purchase access to view the post content.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "paywall_currency": {
                    "description": "The currency for the paywall price on this post. When set along with paywall_amount, users must purchase access to view the post content.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Currencies"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pinned": {
                    "description": "Whether this post should be pinned to the top of the forum.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "poll": {
                    "description": "A poll to attach to this post, allowing members to vote on options.",
                    "properties": {
                      "options": {
                        "description": "The options for the poll. Must have sequential IDs starting from 1",
                        "items": {
                          "description": "Input type for a single poll option",
                          "properties": {
                            "id": {
                              "description": "Sequential ID for the poll option (starting from '1')",
                              "type": "string"
                            },
                            "text": {
                              "description": "The text of the poll option",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "options"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "rich_content": {
                    "description": "The rich content of the post in Tiptap JSON format. When provided, takes priority over the markdown content field for rendering.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls who can see this forum post, such as members only or public.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumPostVisibilityTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "experience_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:post:create"
            ]
          }
        ],
        "summary": "Create forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.create({ experience_id: 'exp_xxxxxxxxxxxxxx' });\n\nconsole.log(forumPost.id);"
          }
        ]
      }
    },
    "/forum_posts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing forum post.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "retrieveForumPost",
        "parameters": [
          {
            "description": "The unique identifier of the forum post to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:read"
            ]
          }
        ],
        "summary": "Retrieve forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.retrieve('id');\n\nconsole.log(forumPost.id);"
          }
        ]
      },
      "patch": {
        "description": "Edit the content, attachments, pinned status, or visibility of an existing forum post or comment.",
        "operationId": "updateForumPost",
        "parameters": [
          {
            "description": "The unique identifier of the forum post to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateForumPost",
                "properties": {
                  "attachments": {
                    "description": "A replacement list of file attachments for this post, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The updated body of the post in Markdown format. For example, 'Check out this **update**'. Hidden if the post is paywalled and the viewer has not purchased access.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_pinned": {
                    "description": "Whether this post should be pinned to the top of the forum. Only top-level posts can be pinned, not comments.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The updated title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls who can see this forum post, such as members only or public.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumPostVisibilityTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.update('id');\n\nconsole.log(forumPost.id);"
          }
        ]
      }
    },
    "/forums": {
      "get": {
        "description": "Returns a paginated list of forums within a specific company, with optional filtering by product.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "listForum",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a product to filter by. When set, only forums connected to this product are returned.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list forums for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ForumFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ForumListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:read"
            ]
          }
        ],
        "summary": "List forums",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const forumListResponse of client.forums.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(forumListResponse.id);\n}"
          }
        ]
      }
    },
    "/forums/{id}": {
      "get": {
        "description": "Retrieves the details of an existing forum.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "retrieveForum",
        "parameters": [
          {
            "description": "The unique identifier of the forum or experience to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forum"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:read"
            ]
          }
        ],
        "summary": "Retrieve forum",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forum = await client.forums.retrieve('id');\n\nconsole.log(forum.id);"
          }
        ]
      },
      "patch": {
        "description": "Update moderation and notification settings for a forum, such as who can post, who can comment, and email notification preferences.\n\nRequired permissions:\n - `forum:moderate`",
        "operationId": "updateForum",
        "parameters": [
          {
            "description": "The unique identifier of the forum to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a forum ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateForum",
                "properties": {
                  "banned_words": {
                    "description": "A list of words that are automatically blocked from posts in this forum. For example, ['spam', 'scam'].",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "banner_image": {
                    "description": "The banner image displayed at the top of the forum page. Pass null to remove the existing banner.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "email_notification_preference": {
                    "description": "Controls how email notifications are sent to members when new posts are created in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumEmailNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_comment": {
                    "description": "Controls which roles are allowed to comment on posts in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumWhoCanCommentTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_post": {
                    "description": "Controls which roles are allowed to create new posts in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumWhoCanPostTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forum"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "forum:moderate"
            ]
          }
        ],
        "summary": "Update forum",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forum = await client.forums.update('id');\n\nconsole.log(forum.id);"
          }
        ]
      }
    },
    "/identity_profiles": {
      "get": {
        "description": "Returns a paginated list of identity profiles. When account_id is provided, lists IPs currently linked to that account's ledger. When omitted, lists IPs linked to any ledger the actor can read (including child accounts under a parent).\n\nRequired permissions:\n - `identity:read`",
        "operationId": "listIdentityProfile",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "profile_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IdentityProfileKinds",
              "description": "Filter by profile type (individual or business)."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IdentityProfileStatuses",
              "description": "Filter by derived verification status."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to filter to. When omitted, returns IPs across all ledgers the actor can read.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for IdentityProfile.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/IdentityProfileListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "identity:read"
            ]
          }
        ],
        "summary": "List identity profiles",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/identity_profiles/{id}": {
      "delete": {
        "description": "Unlinks an IdentityProfile from a LedgerAccount (flips the matching link to is_current=false).",
        "operationId": "unlinkIdentityProfile",
        "parameters": [
          {
            "description": "The ID of the IdentityProfile to unlink.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "ledger_account_id",
            "required": true,
            "schema": {
              "description": "The ID of the LedgerAccount to unlink the identity profile from.",
              "example": "ldgr_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfile"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Unlink an identity profile",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      },
      "get": {
        "description": "Retrieves the details of an existing identity profile.\n\nRequired permissions:\n - `identity:read`",
        "operationId": "retrieveIdentityProfile",
        "parameters": [
          {
            "description": "The unique identifier of the identity profile (idpf_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfile"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "identity:read"
            ]
          }
        ],
        "summary": "Retrieve identity profile",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/identity_profiles/{id}/verifications": {
      "get": {
        "description": "Returns a list of verifications attached to an identity profile, ordered by most recent first.\n\nRequired permissions:\n - `identity:read`",
        "operationId": "listVerificationsIdentityProfile",
        "parameters": [
          {
            "description": "The unique identifier of the identity profile (idpf_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Verification.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
                        "properties": {
                          "created_at": {
                            "description": "When the verification record was created.",
                            "example": "2023-12-01T05:00:00.401Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "description": "The numeric id of the verification record.",
                            "example": "verf_xxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "last_error_code": {
                            "description": "The most recent error code returned during verification. Null if no error has occurred.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/VerificationErrorCodes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "last_error_reason": {
                            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                            "example": "Document image was too blurry to read.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "session_url": {
                            "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                            "example": "https://verify.stripe.com/session/abc123",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "$ref": "#/components/schemas/VerificationStatuses",
                            "description": "The current status of this verification session."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "session_url",
                          "last_error_code",
                          "last_error_reason",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "identity:read"
            ]
          }
        ],
        "summary": "List identity profile verifications",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/invoices": {
      "get": {
        "description": "Returns a paginated list of invoices for a company, with optional filtering by product, status, collection method, and creation date.\n\nRequired permissions:\n - `invoice:basic:read`",
        "operationId": "listInvoice",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter invoices to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "collection_methods",
            "required": false,
            "schema": {
              "description": "Filter invoices by their collection method.",
              "items": {
                "$ref": "#/components/schemas/InvoiceCollectionMethods"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter invoices by their current status.",
              "items": {
                "$ref": "#/components/schemas/InvoiceStatuses"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/InvoicesSortableColumns",
              "description": "The field to order results by, such as creation date or due date."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return invoices created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return invoices created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list invoices for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicInvoice.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:basic:read"
            ]
          }
        ],
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const invoiceListItem of client.invoices.list()) {\n  console.log(invoiceListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create an invoice for a customer. The invoice can be charged automatically using a stored payment method, or sent to the customer for manual payment.\n\nRequired permissions:\n - `invoice:create`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`",
        "operationId": "createInvoice",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateInvoice",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateInvoice",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create this invoice for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "automatically_finalizes_at": {
                        "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email to the customer at the specified time.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "billing_address": {
                        "description": "Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.",
                        "properties": {
                          "city": {
                            "description": "The city of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "country": {
                            "description": "The country of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line1": {
                            "description": "The line 1 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line2": {
                            "description": "The line 2 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "description": "The name of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "description": "The phone number of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postal_code": {
                            "description": "The postal code of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "description": "The state of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tax_id_type": {
                            "description": "The type of tax identifier.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxIdentifierTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tax_id_value": {
                            "description": "The value of the tax identifier.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "charge_buyer_fee": {
                        "description": "Whether to charge the customer a buyer fee on this invoice.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "collection_method": {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods",
                        "description": "How the invoice should be collected. Use charge_automatically to charge a stored payment method, or send_invoice to email the customer."
                      },
                      "customer_name": {
                        "description": "The name of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "due_date": {
                        "description": "The date by which the invoice must be paid. Required unless save_as_draft is true.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_address": {
                        "description": "The email address of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line_items": {
                        "description": "Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge.",
                        "items": {
                          "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                          "properties": {
                            "label": {
                              "description": "The label or description for this line item.",
                              "type": "string"
                            },
                            "quantity": {
                              "description": "The quantity of this line item. Defaults to 1.",
                              "example": 6.9,
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "unit_price": {
                              "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount.",
                              "example": 6.9,
                              "type": "number"
                            }
                          },
                          "required": [
                            "label",
                            "unit_price"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "mailing_address_id": {
                        "description": "The unique identifier of an existing mailing address to attach to this invoice. Cannot be used together with billing_address.",
                        "example": "ma_xxxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The unique identifier of an existing member to create this invoice for. If not provided, you must supply an email_address and customer_name.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The unique identifier of the payment method to charge. Required when collection_method is charge_automatically.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_token_id": {
                        "description": "The payment token ID to use for this invoice. If using charge_automatically, you must provide a payment_token.",
                        "example": "payt_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes defining the price, currency, and billing interval for this invoice.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans).",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Currencies"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legacy_payment_method_controls": {
                            "description": "Whether this plan uses legacy payment method controls",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "unlimited_stock": {
                            "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": "object"
                      },
                      "product": {
                        "description": "The properties of the product to create for this invoice. Provide this to create a new product inline.",
                        "properties": {
                          "product_tax_code_id": {
                            "description": "The ID of the product tax code to apply to this product.",
                            "example": "ptc_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the product.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "title"
                        ],
                        "type": "object"
                      },
                      "save_as_draft": {
                        "description": "When true, creates the invoice as a draft without sending or charging. Relaxes customer and due date requirements.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "subscription_billing_anchor_at": {
                        "description": "The date that defines when the subscription billing cycle should start. When set on a renewal plan invoice, this anchors all future billing periods to this date.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan",
                      "collection_method",
                      "product"
                    ],
                    "title": "CreateInvoiceInputWithProduct",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateInvoice",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to create this invoice for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "automatically_finalizes_at": {
                        "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email to the customer at the specified time.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "billing_address": {
                        "description": "Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.",
                        "properties": {
                          "city": {
                            "description": "The city of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "country": {
                            "description": "The country of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line1": {
                            "description": "The line 1 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line2": {
                            "description": "The line 2 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "description": "The name of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "description": "The phone number of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postal_code": {
                            "description": "The postal code of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "description": "The state of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tax_id_type": {
                            "description": "The type of tax identifier.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxIdentifierTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tax_id_value": {
                            "description": "The value of the tax identifier.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "charge_buyer_fee": {
                        "description": "Whether to charge the customer a buyer fee on this invoice.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "collection_method": {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods",
                        "description": "How the invoice should be collected. Use charge_automatically to charge a stored payment method, or send_invoice to email the customer."
                      },
                      "customer_name": {
                        "description": "The name of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "due_date": {
                        "description": "The date by which the invoice must be paid. Required unless save_as_draft is true.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_address": {
                        "description": "The email address of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line_items": {
                        "description": "Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge.",
                        "items": {
                          "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                          "properties": {
                            "label": {
                              "description": "The label or description for this line item.",
                              "type": "string"
                            },
                            "quantity": {
                              "description": "The quantity of this line item. Defaults to 1.",
                              "example": 6.9,
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "unit_price": {
                              "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount.",
                              "example": 6.9,
                              "type": "number"
                            }
                          },
                          "required": [
                            "label",
                            "unit_price"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "mailing_address_id": {
                        "description": "The unique identifier of an existing mailing address to attach to this invoice. Cannot be used together with billing_address.",
                        "example": "ma_xxxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The unique identifier of an existing member to create this invoice for. If not provided, you must supply an email_address and customer_name.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The unique identifier of the payment method to charge. Required when collection_method is charge_automatically.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_token_id": {
                        "description": "The payment token ID to use for this invoice. If using charge_automatically, you must provide a payment_token.",
                        "example": "payt_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes defining the price, currency, and billing interval for this invoice.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans).",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Currencies"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legacy_payment_method_controls": {
                            "description": "Whether this plan uses legacy payment method controls",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "unlimited_stock": {
                            "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": "object"
                      },
                      "product_id": {
                        "description": "The unique identifier of an existing product to create this invoice for.",
                        "example": "prod_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "save_as_draft": {
                        "description": "When true, creates the invoice as a draft without sending or charging. Relaxes customer and due date requirements.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "subscription_billing_anchor_at": {
                        "description": "The date that defines when the subscription billing cycle should start. When set on a renewal plan invoice, this anchors all future billing periods to this date.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan",
                      "collection_method",
                      "product_id"
                    ],
                    "title": "CreateInvoiceInputWithProductId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:create",
              "member:email:read",
              "member:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Create invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.create({\n  collection_method: 'send_invoice',\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  plan: {},\n  product: { title: 'title' },\n});\n\nconsole.log(invoice.id);"
          }
        ]
      }
    },
    "/invoices/{id}": {
      "delete": {
        "description": "Delete a draft invoice.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "deleteInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the draft invoice to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Delete invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.delete('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing invoice.\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`",
        "operationId": "retrieveInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice, or a secure token.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:basic:read",
              "member:email:read",
              "member:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Retrieve invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.retrieve('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a draft invoice's details.\n\nRequired permissions:\n - `invoice:update`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`",
        "operationId": "updateInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateInvoice",
                "properties": {
                  "automatically_finalizes_at": {
                    "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email at the specified time.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "billing_address": {
                    "description": "Inline billing address to create or update a mailing address for this invoice.",
                    "properties": {
                      "city": {
                        "description": "The city of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "country": {
                        "description": "The country of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line1": {
                        "description": "The line 1 of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line2": {
                        "description": "The line 2 of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The name of the customer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "description": "The phone number of the customer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postal_code": {
                        "description": "The postal code of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "state": {
                        "description": "The state of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "tax_id_type": {
                        "description": "The type of tax identifier.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/TaxIdentifierTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tax_id_value": {
                        "description": "The value of the tax identifier.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "charge_buyer_fee": {
                    "description": "Whether to charge the customer a buyer fee on this invoice.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "collection_method": {
                    "description": "How the invoice should be collected.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "customer_name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "due_date": {
                    "description": "The date by which the invoice must be paid.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email_address": {
                    "description": "The email address of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line_items": {
                    "description": "Line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price. Individual items may be negative to represent a credit, as long as the sum is not negative and clears the currency's minimum charge. Pass an empty list to remove the breakdown.",
                    "items": {
                      "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                      "properties": {
                        "label": {
                          "description": "The label or description for this line item.",
                          "type": "string"
                        },
                        "quantity": {
                          "description": "The quantity of this line item. Defaults to 1.",
                          "example": 6.9,
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "unit_price": {
                          "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43. Negative values represent a credit or deduction, as long as the line items still total a chargeable amount.",
                          "example": 6.9,
                          "type": "number"
                        }
                      },
                      "required": [
                        "label",
                        "unit_price"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "mailing_address_id": {
                    "description": "The unique identifier of an existing mailing address to attach.",
                    "example": "ma_xxxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_id": {
                    "description": "The unique identifier of a member to assign as the customer.",
                    "example": "mber_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "payment_method_id": {
                    "description": "The unique identifier of the payment method to charge.",
                    "example": "pmt_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "plan": {
                    "description": "Updated plan attributes.",
                    "properties": {
                      "adaptive_pricing_enabled": {
                        "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "billing_period": {
                        "description": "The interval in days at which the plan charges (renewal plans).",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "custom_fields": {
                        "description": "An array of custom field objects.",
                        "items": {
                          "properties": {
                            "field_type": {
                              "$ref": "#/components/schemas/CustomFieldTypes",
                              "description": "The type of the custom field."
                            },
                            "id": {
                              "description": "The ID of the custom field (if being updated)",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "description": "The name of the custom field.",
                              "type": "string"
                            },
                            "order": {
                              "description": "The order of the field.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "placeholder": {
                              "description": "The placeholder value of the field.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "required": {
                              "description": "Whether or not the field is required.",
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "field_type",
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "description": {
                        "description": "The description of the plan.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "expiration_days": {
                        "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "initial_price": {
                        "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "internal_notes": {
                        "description": "A personal description or notes section for the business.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "legacy_payment_method_controls": {
                        "description": "Whether this plan uses legacy payment method controls",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan_type": {
                        "description": "Indicates if the plan is a one time payment or recurring.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "release_method": {
                        "description": "This is the release method the business uses to sell this plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/ReleaseMethod"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "renewal_price": {
                        "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "stock": {
                        "description": "The number of units available for purchase.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "trial_period_days": {
                        "description": "The number of free trial days added before a renewal plan.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "unlimited_stock": {
                        "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "Shows or hides the plan from public/business view.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Visibility"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The unique identifier of an existing product to attach to this invoice. Only allowed while the invoice is still a draft.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "subscription_billing_anchor_at": {
                    "description": "The date that defines when the subscription billing cycle should start.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update",
              "member:email:read",
              "member:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Update invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.update('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice.id);"
          }
        ]
      }
    },
    "/invoices/{id}/mark_paid": {
      "post": {
        "description": "Mark an open invoice as paid when payment was collected outside of Whop.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "markPaidInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to mark as paid.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Mark paid invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.markPaid('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/invoices/{id}/mark_uncollectible": {
      "post": {
        "description": "Mark an open invoice as uncollectible when payment is not expected.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "markUncollectibleInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to mark as uncollectible.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Mark uncollectible invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.markUncollectible('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/invoices/{id}/resend": {
      "post": {
        "description": "Resend the notification email for an existing invoice to the customer.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "resendInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to resend.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Resend invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.resend('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/invoices/{id}/void": {
      "post": {
        "description": "Void an open invoice so it can no longer be paid. Voiding is permanent and cannot be undone.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "voidInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to void.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Void invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.void('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/leads": {
      "get": {
        "description": "Returns a paginated list of leads for a company, with optional filtering by product and creation date.\n\nRequired permissions:\n - `lead:basic:read`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "listLead",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return leads created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return leads created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter leads to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list leads for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Lead.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/LeadListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "lead:basic:read",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "List leads",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const leadListResponse of client.leads.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(leadListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Record a new lead for a company, capturing a potential customer's interest in a specific product.\n\nRequired permissions:\n - `lead:manage`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "createLead",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateLeadV2",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create the lead for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A JSON object of custom metadata to attach to the lead for tracking purposes.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The unique identifier of the product the lead is interested in, starting with 'prod_'.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "referrer": {
                    "description": "The referral URL that brought the lead to the company, such as 'https://example.com/landing'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to record as the lead. If authenticated as a user, that user is used automatically.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "account_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "lead:manage",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Create lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.create({ company_id: 'biz_xxxxxxxxxxxxxx' });\n\nconsole.log(lead.id);"
          }
        ]
      }
    },
    "/leads/{id}": {
      "get": {
        "description": "Retrieves the details of an existing lead.\n\nRequired permissions:\n - `lead:basic:read`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "retrieveLead",
        "parameters": [
          {
            "description": "The unique identifier of the lead to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lead_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "lead:basic:read",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Retrieve lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.retrieve('lead_xxxxxxxxxxxxx');\n\nconsole.log(lead.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the metadata or referrer information on an existing lead record.\n\nRequired permissions:\n - `lead:manage`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "updateLead",
        "parameters": [
          {
            "description": "The unique identifier of the lead to update, starting with 'lead_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lead_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateLead",
                "properties": {
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A JSON object of custom metadata to set on the lead, replacing any existing metadata.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "referrer": {
                    "description": "The updated referral URL for the lead, such as 'https://example.com/landing'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "lead:manage",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Update lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.update('lead_xxxxxxxxxxxxx');\n\nconsole.log(lead.id);"
          }
        ]
      }
    },
    "/ledger_accounts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing ledger account.\n\nRequired permissions:\n - `company:balance:read`\n - `payout:account:read`",
        "operationId": "retrieveLedgerAccount",
        "parameters": [
          {
            "description": "The identifier to look up the ledger account. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ldgr_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerAccount"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "company:balance:read",
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve ledger account",
        "tags": [
          "Ledger accounts"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ledgerAccount = await client.ledgerAccounts.retrieve('ldgr_xxxxxxxxxxxxx');\n\nconsole.log(ledgerAccount.id);"
          }
        ]
      }
    },
    "/members": {
      "get": {
        "description": "Returns a paginated list of members for a company, with extensive filtering by product, plan, status, access level, and more.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `member:phone:read`",
        "operationId": "listMember",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Defaults to descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MembersSortableColumns",
              "description": "The column to sort members by, such as creation date or revenue."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return members created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return members created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "access_level",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AccessLevel",
              "description": "Filter members by their current access level to the product."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those belonging to these specific products.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those subscribed to these specific plans.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those matching these specific user identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter members by their current subscription status.",
              "items": {
                "$ref": "#/components/schemas/MemberStatuses"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "promo_code_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those who used these specific promo codes.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "most_recent_actions",
            "required": false,
            "schema": {
              "description": "Filter members by their most recent activity type.",
              "items": {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search members by name, username, or email. Email filtering requires the member:email:read permission.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list members for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CompanyMember.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MemberListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:basic:read",
              "member:email:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "List members",
        "tags": [
          "Members"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const member of client.members.list()) {\n  console.log(member.id);\n}"
          }
        ]
      }
    },
    "/members/{id}": {
      "get": {
        "description": "Retrieves the details of an existing member.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `member:phone:read`",
        "operationId": "retrieveMember",
        "parameters": [
          {
            "description": "The unique identifier of the member to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:basic:read",
              "member:email:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve member",
        "tags": [
          "Members"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst member = await client.members.retrieve('id');\n\nconsole.log(member.id);"
          }
        ]
      }
    },
    "/memberships": {
      "get": {
        "description": "Returns a paginated list of memberships, with optional filtering by product, plan, status, and user.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "listMembership",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Defaults to descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MembershipsSortableColumns",
              "description": "The field to sort results by. Null uses the default sort order."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter to only memberships matching these statuses.",
              "items": {
                "$ref": "#/components/schemas/MembershipStatus"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "cancel_options",
            "required": false,
            "schema": {
              "description": "Filter to only memberships matching these cancellation reasons.",
              "items": {
                "$ref": "#/components/schemas/CancelOptions"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "cancelation_status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/CancelationStatus",
              "description": "Filter memberships by whether the customer is canceling, left, or was won back."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "has_cancelation_reason",
            "required": false,
            "schema": {
              "description": "Filter memberships by whether they have a structured or free-text cancellation reason.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "include_text_only_cancelation_reasons",
            "required": false,
            "schema": {
              "description": "When filtering by the other cancellation option, also include memberships that only have a free-text cancellation reason.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these user identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "promo_code_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships that used these promo code identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return memberships created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return memberships created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list memberships for. Required when using an API key.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicMembership.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MembershipListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    },
                    "total_count": {
                      "description": "The total number of items in this connection.",
                      "example": 42,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "data",
                    "page_info",
                    "total_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List memberships",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const membership of client.memberships.list()) {\n  console.log(membership.id);\n}"
          }
        ]
      }
    },
    "/memberships/{id}": {
      "get": {
        "description": "Retrieves the details of an existing membership.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "retrieveMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership, or a license key.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.retrieve('id');\n\nconsole.log(membership.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a membership's metadata or other mutable properties.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "updateMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateMembershipV2",
                "properties": {
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A JSON object of key-value pairs to store on the membership. Replaces any existing metadata.",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:manage",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Update membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.update('id');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/add_free_days": {
      "post": {
        "description": "Add free days to extend a membership's current billing period, expiration date, or Stripe trial.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "addFreeDaysMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for AddFreeDaysToMembership",
                "properties": {
                  "free_days": {
                    "description": "The number of free days to add (1-1095). Extends the billing period, expiration date, or Stripe trial depending on plan type.",
                    "example": 42,
                    "type": "integer"
                  }
                },
                "required": [
                  "free_days"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:manage",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Add free days membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM"
      }
    },
    "/memberships/{id}/cancel": {
      "post": {
        "description": "Cancel a membership either immediately or at the end of the current billing period. Immediate cancellation revokes access right away.\n\nRequired permissions:\n - `membership:cancel`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "cancelMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to cancel.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CancelMembership",
                "properties": {
                  "cancellation_mode": {
                    "description": "Whether to cancel immediately or at the end of the current billing period. Defaults to at_period_end.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/MembershipCancellationModes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "membership:cancel",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Cancel membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.cancel('id');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/pause": {
      "post": {
        "description": "Pause a membership's recurring payments. The customer retains access but will not be charged until the membership is resumed.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "pauseMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to pause.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for PauseMembership",
                "properties": {
                  "resumes_at": {
                    "description": "When the membership should automatically resume payment collection. If not provided, the membership stays paused until manually resumed.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "void_payments": {
                    "description": "Whether to void any outstanding past-due payments on this membership, preventing future collection attempts.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:manage",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Pause membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.pause('id');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/resume": {
      "post": {
        "description": "Resume a previously paused membership's recurring payments. Billing resumes on the next cycle.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "resumeMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to resume.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:manage",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Resume membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.resume('id');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/resync_access": {
      "post": {
        "description": "Re-run access fulfillment for a membership. Recomputes the member's content access on Whop, re-validates their Discord link (re-adding them to the server and re-assigning roles if needed), and re-fulfills TradingView indicator access. Telegram access is invite-based and cannot be resynced here. The outcome is written to the membership's logs.\n\nRequired permissions:\n - `membership:resync_access`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "resyncAccessMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to resync access for.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "membership:resync_access",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Resync access membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM"
      }
    },
    "/memberships/{id}/uncancel": {
      "post": {
        "description": "Reverse a pending cancellation for a membership that was scheduled to cancel at period end.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "uncancelMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to uncancel.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:manage",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Uncancel membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM"
      }
    },
    "/messages": {
      "get": {
        "description": "Returns a paginated list of messages within a specific experience chat, DM, or group chat channel, sorted by creation time.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `support_chat:read`",
        "operationId": "listMessage",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "channel_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the channel or experience to list messages for.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for messages by creation time. Use 'asc' for oldest first or 'desc' for newest first."
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsPost.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MessageListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "List messages",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const messageListResponse of client.messages.list({ channel_id: 'channel_id' })) {\n  console.log(messageListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Send a new message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies.\n\nRequired permissions (one of):\n - `chat:message:create`\n - `dms:message:manage`\n - `livestream:chat:write`\n - `support_chat:message:create`",
        "operationId": "createMessage",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateMessage",
                "properties": {
                  "attachments": {
                    "description": "A list of file attachments to include with the message, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "auto_detect_links": {
                    "description": "Automatically detect URLs in the message and generate link previews.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "channel_id": {
                    "description": "The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'.",
                    "type": "string"
                  },
                  "content": {
                    "description": "The body of the message in Markdown format. For example, 'Hello **world**'.",
                    "type": "string"
                  },
                  "poll": {
                    "description": "A poll to attach to this message, allowing recipients to vote on options.",
                    "properties": {
                      "options": {
                        "description": "The options for the poll. Must have sequential IDs starting from 1",
                        "items": {
                          "description": "Input type for a single poll option",
                          "properties": {
                            "id": {
                              "description": "Sequential ID for the poll option (starting from '1')",
                              "type": "string"
                            },
                            "text": {
                              "description": "The text of the poll option",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "options"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "replying_to_message_id": {
                    "description": "The unique identifier of the message this is replying to, creating a threaded reply.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "channel_id",
                  "content"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:message:create"
            ]
          },
          {
            "bearerAuth": [
              "dms:message:manage"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:write"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:message:create"
            ]
          }
        ],
        "summary": "Create message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.create({ channel_id: 'channel_id', content: 'content' });\n\nconsole.log(message.id);"
          }
        ]
      }
    },
    "/messages/{id}": {
      "delete": {
        "description": "Permanently delete a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message.\n\nRequired permissions (one of):\n - `chat:message:create` and `chat:read`\n - `dms:message:manage` and `dms:read`\n - `livestream:chat:write` and `livestream:chat:read`\n - `support_chat:message:create` and `support_chat:read`",
        "operationId": "deleteMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:message:create",
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:message:manage",
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:write",
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:message:create",
              "support_chat:read"
            ]
          }
        ],
        "summary": "Delete message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.delete('id');\n\nconsole.log(message);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing message.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `livestream:chat:read`\n - `support_chat:read`",
        "operationId": "retrieveMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.retrieve('id');\n\nconsole.log(message.id);"
          }
        ]
      },
      "patch": {
        "description": "Edit the content, attachments, or pinned status of an existing message in an experience chat, DM, or group chat channel.\n\nRequired permissions (one of):\n - `chat:message:create`\n - `dms:message:manage`\n - `livestream:chat:write`\n - `support_chat:message:create`",
        "operationId": "updateMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateMessage",
                "properties": {
                  "attachments": {
                    "description": "A replacement list of file attachments for this message, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The updated body of the message in Markdown format. For example, 'Hello **world**'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_pinned": {
                    "description": "Whether this message should be pinned to the top of the channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:message:create"
            ]
          },
          {
            "bearerAuth": [
              "dms:message:manage"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:write"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:message:create"
            ]
          }
        ],
        "summary": "Update message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.update('id');\n\nconsole.log(message.id);"
          }
        ]
      }
    },
    "/notifications": {
      "post": {
        "description": "Send a push notification to users in an experience or company team. The notification is processed asynchronously and supports targeting specific users.\n\nRequired permissions:\n - `notification:create`",
        "operationId": "createNotification",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for SendNotificationV2",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of SendNotificationV2",
                    "properties": {
                      "account_id": {
                        "description": "The unique identifier of the company to target. Only team members of this company will receive the notification. Clicking the notification opens your dashboard app view.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "content": {
                        "description": "The main body text of the notification displayed to the user.",
                        "type": "string"
                      },
                      "icon_user_id": {
                        "description": "The unique identifier of a user whose profile picture will be used as the notification icon. Defaults to the experience or company avatar when not provided.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rest_path": {
                        "description": "A path segment appended to the generated deep link that opens your app. Use [restPath] in your app path configuration to read this parameter. For example, '/settings/billing'.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtitle": {
                        "description": "An optional secondary line of text displayed below the title in the notification.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The headline text of the notification, displayed prominently to the user.",
                        "type": "string"
                      },
                      "user_ids": {
                        "description": "An optional list of user IDs to narrow the audience. When provided, only these users receive the notification, provided they are in the targeted experience or company.",
                        "items": {
                          "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                          "type": "string"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "content",
                      "title",
                      "account_id"
                    ],
                    "title": "SendNotificationV2InputWithCompanyId",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of SendNotificationV2",
                    "properties": {
                      "content": {
                        "description": "The main body text of the notification displayed to the user.",
                        "type": "string"
                      },
                      "experience_id": {
                        "description": "The unique identifier of the experience to target. All users with access to this experience will receive the notification. Clicking the notification opens the experience view.",
                        "example": "exp_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "icon_user_id": {
                        "description": "The unique identifier of a user whose profile picture will be used as the notification icon. Defaults to the experience or company avatar when not provided.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rest_path": {
                        "description": "A path segment appended to the generated deep link that opens your app. Use [restPath] in your app path configuration to read this parameter. For example, '/settings/billing'.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtitle": {
                        "description": "An optional secondary line of text displayed below the title in the notification.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The headline text of the notification, displayed prominently to the user.",
                        "type": "string"
                      },
                      "user_ids": {
                        "description": "An optional list of user IDs to narrow the audience. When provided, only these users receive the notification, provided they are in the targeted experience or company.",
                        "items": {
                          "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                          "type": "string"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "content",
                      "title",
                      "experience_id"
                    ],
                    "title": "SendNotificationV2InputWithExperienceId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response from queuing a notification",
                  "properties": {
                    "success": {
                      "description": "Whether the notification was successfully queued for delivery",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "notification:create"
            ]
          }
        ],
        "summary": "Create notification",
        "tags": [
          "Notifications"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst notification = await client.notifications.create({\n  content: 'Drop off at 4180 Burnet Rd. Plan on two days for the full coating.',\n  title: 'Your ceramic coating is booked',\n});\n\nconsole.log(notification.success);"
          }
        ]
      }
    },
    "/payment_methods": {
      "get": {
        "description": "Returns a paginated list of payment methods for a member or company, or for the authenticated user when neither is given, with optional filtering by creation date. A payment method is a stored representation of how a customer intends to pay, such as a card, bank account, or digital wallet.\n\nRequired permissions:\n - `member:payment_methods:read`",
        "operationId": "listPaymentMethod",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member to list payment methods for. Omit this and account_id to list your own saved payment methods.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return payment methods created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return payment methods created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "future_usage",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/FutureUsageTypes",
              "description": "Only return methods that can be charged this way after the buyer leaves. Every stored credential answers either usage today, so this narrows nothing — it used to drop the buyer's platform balance, which now lists on its own endpoint instead of here."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payment_method_types",
            "required": false,
            "schema": {
              "description": "Only return payment methods of these types. Pass the eligible `type` values from the payment method types catalogue so the list holds nothing the purchase cannot take. An empty list returns no payment methods.",
              "items": {
                "$ref": "#/components/schemas/PaymentMethodTypes"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "card_brands",
            "required": false,
            "schema": {
              "description": "Only return cards on these networks, such as the networks the seller accepts. Payment methods that are not cards are unaffected.",
              "items": {
                "$ref": "#/components/schemas/CardBrands"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "card_funding_types",
            "required": false,
            "schema": {
              "description": "Only return cards funded this way. A card whose funding could not be determined is excluded, and payment methods that are not cards are unaffected.",
              "items": {
                "$ref": "#/components/schemas/CardFundingTypes"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "has_payer_document",
            "required": false,
            "schema": {
              "description": "Filter cards by whether they carry the payer identity document their payment provider requires. Payment methods that are not cards are unaffected.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "expired",
            "required": false,
            "schema": {
              "description": "Filter by expiry. Only a card can expire, so `false` keeps every payment method that is not past its expiration month and `true` returns expired cards alone.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "broken",
            "required": false,
            "schema": {
              "description": "Filter by whether the stored credential has permanently stopped charging, such as a vault entry its provider closed.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both. Omit both to address your own saved payment methods.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PaymentMethodInterface.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PaymentMethodListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:payment_methods:read"
            ]
          }
        ],
        "summary": "List payment methods",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentMethodListResponse of client.paymentMethods.list()) {\n  console.log(paymentMethodListResponse);\n}"
          }
        ]
      }
    },
    "/payment_methods/{id}": {
      "delete": {
        "description": "Delete a saved payment method. Cannot delete a payment method attached to an active subscription.\n\nRequired permissions:\n - `member:payment_methods:manage`",
        "operationId": "deletePaymentMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payment method to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "payt_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member. Provide either this or account_id, not both. Omit both to address your own saved payment methods.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both. Omit both to address your own saved payment methods.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:payment_methods:manage"
            ]
          }
        ],
        "summary": "Delete payment method",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins"
      },
      "get": {
        "description": "Retrieves the details of an existing payment method. Addresses a member's wallet when member_id or account_id is given, otherwise your own.\n\nRequired permissions:\n - `member:payment_methods:read`",
        "operationId": "retrievePaymentMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payment method.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "payt_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member. Provide either this or account_id, not both. Omit both to address your own saved payment methods.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both. Omit both to address your own saved payment methods.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "member:payment_methods:read"
            ]
          }
        ],
        "summary": "Retrieve payment method",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst paymentMethod = await client.paymentMethods.retrieve('payt_xxxxxxxxxxxxx');\n\nconsole.log(paymentMethod);"
          }
        ]
      }
    },
    "/payments": {
      "get": {
        "description": "Returns a paginated list of payments for the actor in context, with optional filtering by product, plan, status, billing reason, currency, and creation date.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`",
        "operationId": "listPayment",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ReceiptV2Order",
              "description": "The field to order results by, such as creation date."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter payments to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "billing_reasons",
            "required": false,
            "schema": {
              "description": "Filter payments by their billing reason.",
              "items": {
                "$ref": "#/components/schemas/BillingReasons"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "currencies",
            "required": false,
            "schema": {
              "description": "Filter payments by their currency code.",
              "items": {
                "$ref": "#/components/schemas/Currencies"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter payments to only those associated with these specific plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter payments by their current status.",
              "items": {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "substatuses",
            "required": false,
            "schema": {
              "description": "Filter payments by their current substatus for more granular filtering.",
              "items": {
                "$ref": "#/components/schemas/FriendlyReceiptStatus"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "include_free",
            "required": false,
            "schema": {
              "description": "Whether to include payments with a zero amount. Defaults to false, so zero-amount payments are omitted unless you set this to true — a company whose sales are all free plans returns an empty list without it.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return payments created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return payments created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "updated_before",
            "required": false,
            "schema": {
              "description": "Only return payments last updated before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "updated_after",
            "required": false,
            "schema": {
              "description": "Only return payments last updated after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search payments by user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "checkout_configuration_ids",
            "required": false,
            "schema": {
              "description": "Only return payments from these checkout configurations.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list payments for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Receipt.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PaymentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read"
            ]
          }
        ],
        "summary": "List payments",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentListResponse of client.payments.list()) {\n  console.log(paymentListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Charge a buyer on-session with a `confirmation_token` for the method they selected, or charge an existing member off-session using a stored payment method. You can provide an existing plan or create one inline. The endpoint returns a payment immediately, but processing continues asynchronously. Use webhooks to learn whether it succeeds or fails, and poll the payment's status endpoint for any step the buyer must complete.\n\nRequired permissions:\n - `payment:charge`\n - `plan:create`\n - `access_pass:create`\n - `access_pass:update`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "createPayment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreatePayment",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "capture": {
                        "description": "Whether to capture the card payment immediately. Pass false to place an authorization hold that must be captured in full within five days.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "confirmation_token": {
                        "description": "A confirmation token ID (ctok_) describing a payment method the buyer just supplied. Provide this INSTEAD of member_id and payment_method_id to charge a method that is not yet on file — the buyer is resolved from the token's billing email, or from `email`. The buyer may still have a step to complete (3DS, a redirect, linking a bank); poll the payment's status endpoint for what to do next.",
                        "type": "string"
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the payment belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged. Required unless confirmation_token is provided.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "Pass this object to create a new plan for this payment",
                        "properties": {
                          "application_fee_amount": {
                            "description": "The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The respective currency identifier for the plan."
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for one year.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "force_create_new_plan": {
                            "description": "Whether to force the creation of a new plan even if one with the same attributes already exists.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "product": {
                            "description": "Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.",
                            "properties": {
                              "collect_shipping_address": {
                                "description": "Whether or not to collect shipping information at checkout from the customer.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "custom_statement_descriptor": {
                                "description": "The custom statement descriptor for the product i.e. WHOP*SPORTS, must be between 5 and 22 characters, contain at least one letter, and not contain any of the following characters: <, >, \\, ', \"",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "A written description of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_identifier": {
                                "description": "A unique ID used to find or create a product. When provided during creation, we will look for an existing product with this external identifier — if found, it will be updated; otherwise, a new product will be created.",
                                "type": "string"
                              },
                              "global_affiliate_percentage": {
                                "description": "The percentage of the revenue that goes to the global affiliate program.",
                                "example": 6.9,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "global_affiliate_status": {
                                "description": "The status of the global affiliate program for this product.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headline": {
                                "description": "The headline of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_tax_code_id": {
                                "description": "The ID of the product tax code to apply to this product.",
                                "example": "ptc_xxxxxxxxxxxxxx",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect_purchase_url": {
                                "description": "The URL to redirect the customer to after a purchase.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "route": {
                                "description": "The route of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "The title of the product.",
                                "type": "string"
                              },
                              "visibility": {
                                "description": "This product will/will not be displayed publicly - default hidden.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/Visibility"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "external_identifier",
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product the plan is related to. Either this or product is required.",
                            "example": "prod_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the plan. This will be visible on the product page to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "currency"
                        ],
                        "type": "object"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters. Editable until they return — see the payment's update endpoint. Ignored unless confirmation_token is provided.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan",
                      "confirmation_token"
                    ],
                    "title": "CreatePaymentInputWithPlanAndConfirmationToken",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "capture": {
                        "description": "Whether to capture the card payment immediately. Pass false to place an authorization hold that must be captured in full within five days.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the payment belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The ID of the member to create the payment for. Required unless confirmation_token is provided.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged. Required unless confirmation_token is provided.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "Pass this object to create a new plan for this payment",
                        "properties": {
                          "application_fee_amount": {
                            "description": "The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The respective currency identifier for the plan."
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for one year.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "force_create_new_plan": {
                            "description": "Whether to force the creation of a new plan even if one with the same attributes already exists.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "product": {
                            "description": "Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.",
                            "properties": {
                              "collect_shipping_address": {
                                "description": "Whether or not to collect shipping information at checkout from the customer.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "custom_statement_descriptor": {
                                "description": "The custom statement descriptor for the product i.e. WHOP*SPORTS, must be between 5 and 22 characters, contain at least one letter, and not contain any of the following characters: <, >, \\, ', \"",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "A written description of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_identifier": {
                                "description": "A unique ID used to find or create a product. When provided during creation, we will look for an existing product with this external identifier — if found, it will be updated; otherwise, a new product will be created.",
                                "type": "string"
                              },
                              "global_affiliate_percentage": {
                                "description": "The percentage of the revenue that goes to the global affiliate program.",
                                "example": 6.9,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "global_affiliate_status": {
                                "description": "The status of the global affiliate program for this product.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headline": {
                                "description": "The headline of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_tax_code_id": {
                                "description": "The ID of the product tax code to apply to this product.",
                                "example": "ptc_xxxxxxxxxxxxxx",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect_purchase_url": {
                                "description": "The URL to redirect the customer to after a purchase.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "route": {
                                "description": "The route of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "The title of the product.",
                                "type": "string"
                              },
                              "visibility": {
                                "description": "This product will/will not be displayed publicly - default hidden.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/Visibility"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "external_identifier",
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product the plan is related to. Either this or product is required.",
                            "example": "prod_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the plan. This will be visible on the product page to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "currency"
                        ],
                        "type": "object"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters. Editable until they return — see the payment's update endpoint. Ignored unless confirmation_token is provided.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan",
                      "member_id"
                    ],
                    "title": "CreatePaymentInputWithPlanAndMemberId",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "capture": {
                        "description": "Whether to capture the card payment immediately. Pass false to place an authorization hold that must be captured in full within five days.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "confirmation_token": {
                        "description": "A confirmation token ID (ctok_) describing a payment method the buyer just supplied. Provide this INSTEAD of member_id and payment_method_id to charge a method that is not yet on file — the buyer is resolved from the token's billing email, or from `email`. The buyer may still have a step to complete (3DS, a redirect, linking a bank); poll the payment's status endpoint for what to do next.",
                        "type": "string"
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the payment belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged. Required unless confirmation_token is provided.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan_id": {
                        "description": "An ID of an existing plan to use for the payment.",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters. Editable until they return — see the payment's update endpoint. Ignored unless confirmation_token is provided.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan_id",
                      "confirmation_token"
                    ],
                    "title": "CreatePaymentInputWithPlanIdAndConfirmationToken",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "capture": {
                        "description": "Whether to capture the card payment immediately. Pass false to place an authorization hold that must be captured in full within five days.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the payment belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The ID of the member to create the payment for. Required unless confirmation_token is provided.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged. Required unless confirmation_token is provided.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan_id": {
                        "description": "An ID of an existing plan to use for the payment.",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters. Editable until they return — see the payment's update endpoint. Ignored unless confirmation_token is provided.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "plan_id",
                      "member_id"
                    ],
                    "title": "CreatePaymentInputWithPlanIdAndMemberId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Payment"
                    },
                    {
                      "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
                      "properties": {
                        "client_secret": {
                          "description": "The credential the buyer's surface presents to poll this payment and set its return URL. Returned when a payment created from a confirmation token is created or retrieved by a caller with the payment:charge permission. Null for payments created from a stored payment method or callers without payment:charge. It unlocks this payment and nothing else; treat it like a password for that one attempt.",
                          "example": "pay_xxxxxxxxxxxxxx_secret_v1_xxxx",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "client_secret"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:charge",
              "plan:create",
              "access_pass:create",
              "access_pass:update",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Create payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  confirmation_token: 'confirmation_token',\n  plan: { currency: 'usd' },\n});\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payment.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "retrievePayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Payment"
                    },
                    {
                      "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
                      "properties": {
                        "client_secret": {
                          "description": "The credential the buyer's surface presents to poll this payment and set its return URL. Returned when a payment created from a confirmation token is created or retrieved by a caller with the payment:charge permission. Null for payments created from a stored payment method or callers without payment:charge. It unlocks this payment and nothing else; treat it like a password for that one attempt.",
                          "example": "pay_xxxxxxxxxxxxxx_secret_v1_xxxx",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "client_secret"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retrieve payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.retrieve('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/fees": {
      "get": {
        "description": "Returns the list of fees associated with a specific payment, including platform fees and processing fees.\n\nRequired permissions:\n - `payment:basic:read`",
        "operationId": "feesPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to list fees for.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Fee.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "Represents a fee related to a payment",
                        "properties": {
                          "amount": {
                            "description": "The value or amount to display for the fee.",
                            "example": 6.9,
                            "type": "number"
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The currency of the fee."
                          },
                          "name": {
                            "description": "The label to display for the fee.",
                            "type": "string"
                          },
                          "type": {
                            "$ref": "#/components/schemas/SpecificFeeOrigins",
                            "description": "The specific origin of the fee, if applicable.",
                            "example": "payment_processing_percentage_fee"
                          }
                        },
                        "required": [
                          "name",
                          "amount",
                          "currency",
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List fees",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentListFeesResponse of client.payments.listFees('pay_xxxxxxxxxxxxxx')) {\n  console.log(paymentListFeesResponse.amount);\n}"
          }
        ]
      }
    },
    "/payments/{id}/refund": {
      "post": {
        "description": "Issue a full or partial refund for a payment. The refund is processed through the original payment processor and the membership status is updated accordingly.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "refundPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to refund.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for RefundPayment",
                "properties": {
                  "partial_amount": {
                    "description": "The amount to refund. For multi-currency payments, this is in the charge currency (what the buyer paid). For single-currency, this is in the payment currency. If omitted, the full payment amount is refunded.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Refund payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.refund('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/retry": {
      "post": {
        "description": "Retry a failed or pending payment. This re-attempts the charge using the original payment method and plan details.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "retryPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to retry.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retry payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.retry('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/void": {
      "post": {
        "description": "Void a payment that has not yet been settled. Voiding cancels the payment before it is captured by the payment processor.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "voidPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to void.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "shipment:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Void payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.void('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payout_accounts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payout account.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrievePayoutAccount",
        "parameters": [
          {
            "description": "The unique identifier of the payout account to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "poact_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutAccount"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve payout account",
        "tags": [
          "Payout accounts"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payoutAccount = await client.payoutAccounts.retrieve('poact_xxxxxxxxxxxx');\n\nconsole.log(payoutAccount.id);"
          }
        ]
      }
    },
    "/payout_methods": {
      "get": {
        "description": "Returns a list of active payout methods configured for a company, ordered by most recently created.\n\nRequired permissions:\n - `payout:destination:read`",
        "operationId": "listPayoutMethod",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list payout methods for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PayoutToken.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PayoutMethodListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:destination:read"
            ]
          }
        ],
        "summary": "List payout methods",
        "tags": [
          "Payout methods"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/payout_methods/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payout method.\n\nRequired permissions:\n - `payout:destination:read`",
        "operationId": "retrievePayoutMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payout method to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "potk_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutMethod"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:destination:read"
            ]
          }
        ],
        "summary": "Retrieve payout method",
        "tags": [
          "Payout methods"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/products": {
      "get": {
        "description": "Returns a paginated list of products belonging to a company, with optional filtering by type, visibility, and creation date.\n\nRequired permissions:\n - `access_pass:basic:read`",
        "operationId": "listProduct",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_types",
            "required": false,
            "schema": {
              "description": "Filter to only products matching these type classifications.",
              "items": {
                "$ref": "#/components/schemas/AccessPassTypes"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "visibilities",
            "required": false,
            "schema": {
              "description": "Filter to only products matching these visibility states.",
              "items": {
                "$ref": "#/components/schemas/VisibilityFilter"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AccessPassOrder",
              "description": "The field to sort results by. Defaults to created_at."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for results. Defaults to descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return products created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return products created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list products for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicAccessPass.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ProductListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const productListItem of client.products.list({ account_id: 'account_id' })) {\n  console.log(productListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new product for a company. The product serves as the top-level container for plans and experiences.\n\nRequired permissions:\n - `access_pass:create`\n - `access_pass:basic:read`",
        "operationId": "createProduct",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccessPass",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create this product for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "collect_shipping_address": {
                    "description": "Whether the checkout flow collects a shipping address from the customer.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "custom_cta": {
                    "description": "The call-to-action button label displayed on the product's purchase page (e.g., join, buy, subscribe).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CustomCtas"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_cta_url": {
                    "description": "A URL that the call-to-action button links to instead of the default checkout flow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_statement_descriptor": {
                    "description": "A custom text label that appears on the customer's bank statement. Must be 5-22 characters, contain at least one letter, and not contain <, >, \\, ', or \" characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A written description of the product displayed on its product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_ids": {
                    "description": "The unique identifiers of experiences to connect to this product.",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "global_affiliate_percentage": {
                    "description": "The commission rate as a percentage that affiliates earn through the global affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "global_affiliate_status": {
                    "description": "The enrollment status of this product in the global affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headline": {
                    "description": "A short marketing headline displayed prominently on the product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_affiliate_percentage": {
                    "description": "The commission rate as a percentage that members earn through the member affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "member_affiliate_status": {
                    "description": "The enrollment status of this product in the member affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs to store on the product. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "plan_options": {
                    "description": "Configuration for an automatically generated plan to attach to this product.",
                    "properties": {
                      "base_currency": {
                        "description": "The respective currency identifier for the plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "billing_period": {
                        "description": "The interval at which the plan charges (renewal plans).",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "custom_fields": {
                        "description": "An array of custom field objects.",
                        "items": {
                          "properties": {
                            "field_type": {
                              "$ref": "#/components/schemas/CustomFieldTypes",
                              "description": "The type of the custom field."
                            },
                            "id": {
                              "description": "The ID of the custom field (if being updated)",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "description": "The name of the custom field.",
                              "type": "string"
                            },
                            "order": {
                              "description": "The order of the field.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "placeholder": {
                              "description": "The placeholder value of the field.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "required": {
                              "description": "Whether or not the field is required.",
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "field_type",
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "initial_price": {
                        "description": "An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "plan_type": {
                        "description": "Indicates if the plan is a one time payment or recurring.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "release_method": {
                        "description": "The method by which the plan is released to the public.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/ReleaseMethod"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "renewal_price": {
                        "description": "The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "The visibility of the plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Visibility"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_tax_code_id": {
                    "description": "The unique identifier of the tax classification code to apply to this product.",
                    "example": "ptc_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_purchase_url": {
                    "description": "A URL to redirect the customer to after completing a purchase.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The URL slug for the product's public link.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_welcome_message": {
                    "description": "Whether to send an automated welcome message via support chat when a user joins this product. Defaults to true.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the product. Maximum 80 characters.",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Whether the product is visible to customers. When set to hidden, the product is only accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Visibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "account_id",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "access_pass:create",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Create product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.create({ title: 'Interior Deep Clean' });\n\nconsole.log(product.id);"
          }
        ]
      }
    },
    "/products/{id}": {
      "delete": {
        "description": "Permanently delete a product and remove it from the company's catalog.\n\nRequired permissions:\n - `access_pass:delete`",
        "operationId": "deleteProduct",
        "parameters": [
          {
            "description": "The unique identifier of the product to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "access_pass:delete"
            ]
          }
        ],
        "summary": "Delete product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.delete('id');\n\nconsole.log(product.id);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing product.\n\nRequired permissions:\n - `access_pass:basic:read`",
        "operationId": "retrieveProduct",
        "parameters": [
          {
            "description": "The unique identifier or route slug of the product.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Retrieve product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop();\n\nconst product = await client.products.retrieve('id');\n\nconsole.log(product.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a product's title, description, visibility, and other settings.\n\nRequired permissions:\n - `access_pass:update`\n - `access_pass:basic:read`",
        "operationId": "updateProduct",
        "parameters": [
          {
            "description": "The unique identifier of the product to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAccessPass",
                "properties": {
                  "collect_shipping_address": {
                    "description": "Whether the checkout flow collects a shipping address from the customer.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "custom_cta": {
                    "description": "The call-to-action button label displayed on the product's purchase page (e.g., join, buy, subscribe).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CustomCtas"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_cta_url": {
                    "description": "A URL that the call-to-action button links to instead of the default checkout flow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_statement_descriptor": {
                    "description": "A custom text label that appears on the customer's bank statement. Must be 5-22 characters, contain at least one letter, and not contain <, >, \\, ', or \" characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A written description of the product displayed on its product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gallery_images": {
                    "description": "The gallery images for the product.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "global_affiliate_percentage": {
                    "description": "The commission rate as a percentage that affiliates earn through the global affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "global_affiliate_status": {
                    "description": "The enrollment status of this product in the global affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headline": {
                    "description": "A short marketing headline displayed prominently on the product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_affiliate_percentage": {
                    "description": "The commission rate as a percentage that members earn through the member affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "member_affiliate_status": {
                    "description": "The enrollment status of this product in the member affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs to store on the product. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_tax_code_id": {
                    "description": "The unique identifier of the tax classification code to apply to this product.",
                    "example": "ptc_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_purchase_url": {
                    "description": "A URL to redirect the customer to after completing a purchase.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The URL slug for the product's public link.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_welcome_message": {
                    "description": "Whether to send an automated welcome message via support chat when a user joins this product.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "store_page_config": {
                    "description": "Layout and display configuration for this product on the company's store page.",
                    "properties": {
                      "custom_cta": {
                        "description": "Custom call-to-action text for the product's store page.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "show_price": {
                        "description": "Whether or not to show the price on the product's store page.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the product. Maximum 80 characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Whether the product is visible to customers. When set to hidden, the product is only accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Visibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "access_pass:update",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Update product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.update('id');\n\nconsole.log(product.id);"
          }
        ]
      }
    },
    "/promo_codes": {
      "get": {
        "description": "Returns a paginated list of promo codes belonging to a company, with optional filtering by product, plan, and status.\n\nRequired permissions:\n - `promo_code:basic:read`\n - `access_pass:basic:read`",
        "operationId": "listPromoCode",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter to only promo codes scoped to these product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter to only promo codes scoped to these plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PromoCodeStatus",
              "description": "Filter to only promo codes matching this status."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return promo codes created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return promo codes created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list promo codes for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PromoCode.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PromoCodeListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "promo_code:basic:read",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "List promo codes",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const promoCodeListResponse of client.promoCodes.list({ account_id: 'account_id' })) {\n  console.log(promoCodeListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new promo code that applies a discount at checkout. Can be scoped to specific products or plans.\n\nRequired permissions:\n - `promo_code:create`\n - `access_pass:basic:read`",
        "operationId": "createPromoCode",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreatePromoCode",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create this promo code for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "amount_off": {
                    "description": "The discount amount. When promo_type is percentage, this is the percent off (e.g., 20 for 20% off). When promo_type is flat_amount, this is the currency amount off (e.g., 10.00 for $10.00 off).",
                    "example": 6.9,
                    "type": "number"
                  },
                  "base_currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The three-letter ISO currency code for the promo code discount."
                  },
                  "churned_users_only": {
                    "description": "Whether to restrict this promo code to only users who have previously churned from the company.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "code": {
                    "description": "The alphanumeric code customers enter at checkout to apply the discount.",
                    "type": "string"
                  },
                  "existing_memberships_only": {
                    "description": "Whether this promo code can only be applied to existing memberships, such as for cancellation retention offers.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "expires_at": {
                    "description": "The datetime when the promo code expires and can no longer be used. Null means it never expires.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "new_users_only": {
                    "description": "Whether to restrict this promo code to only users who have never purchased from the company before.",
                    "type": "boolean"
                  },
                  "one_per_customer": {
                    "description": "Whether each customer can only use this promo code once.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "plan_ids": {
                    "description": "The identifiers of plans this promo code applies to. When product_id is also provided, only plans attached to that product are included.",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The identifier of the product to scope this promo code to. When provided, the promo code only applies to plans attached to this product.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "promo_duration_months": {
                    "description": "The number of billing months the discount remains active. For example, 3 means the discount applies to the first 3 billing cycles.",
                    "example": 42,
                    "type": "integer"
                  },
                  "promo_type": {
                    "$ref": "#/components/schemas/PromoTypes",
                    "description": "The discount type, either percentage or flat_amount."
                  },
                  "stock": {
                    "description": "The maximum number of times this promo code can be used. Ignored when unlimited_stock is true.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "unlimited_stock": {
                    "description": "Whether the promo code can be used an unlimited number of times.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "amount_off",
                  "base_currency",
                  "code",
                  "account_id",
                  "new_users_only",
                  "promo_duration_months",
                  "promo_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoCode"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "promo_code:create",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Create promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.create({\n  account_id: 'biz_xxxxxxxxxxxxxx',\n  amount_off: 25,\n  base_currency: 'usd',\n  code: 'AFFILIATE25',\n  new_users_only: true,\n  promo_duration_months: 3,\n  promo_type: 'percentage',\n});\n\nconsole.log(promoCode.id);"
          }
        ]
      }
    },
    "/promo_codes/{id}": {
      "delete": {
        "description": "Archive a promo code, preventing it from being used in future checkouts. Existing memberships are not affected.\n\nRequired permissions:\n - `promo_code:delete`",
        "operationId": "deletePromoCode",
        "parameters": [
          {
            "description": "The unique identifier of the promo code to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "promo_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "promo_code:delete"
            ]
          }
        ],
        "summary": "Delete promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.delete('id');\n\nconsole.log(promoCode.id);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing promo code.\n\nRequired permissions:\n - `promo_code:basic:read`\n - `access_pass:basic:read`",
        "operationId": "retrievePromoCode",
        "parameters": [
          {
            "description": "The unique identifier of the promo code.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "promo_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoCode"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "promo_code:basic:read",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Retrieve promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.retrieve('id');\n\nconsole.log(promoCode.id);"
          }
        ]
      },
      "patch": {
        "description": "Update whether a promo code can be used at checkout.\n\nRequired permissions:\n - `promo_code:update`\n - `access_pass:basic:read`",
        "operationId": "updatePromoCode",
        "parameters": [
          {
            "description": "The unique identifier of the promo code to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "promo_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdatePromoCode",
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/PromoCodeUpdateStatus",
                    "description": "The status to apply to the promo code."
                  }
                },
                "required": [
                  "status"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoCode"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "promo_code:update",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Update promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins"
      }
    },
    "/reactions": {
      "get": {
        "description": "Returns a paginated list of emoji reactions on a specific message or forum post, sorted by most recent.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `forum:read`\n - `livestream:chat:read`\n - `support_chat:read`",
        "operationId": "listReaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "resource_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the message or forum post to list reactions for.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Reaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ReactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "forum:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "List reactions",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const reactionListResponse of client.reactions.list({ resource_id: 'resource_id' })) {\n  console.log(reactionListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add an emoji reaction or poll vote to a message or forum post. In forums, the reaction is always a like.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `forum:read`\n - `livestream:chat:read`\n - `support_chat:read`",
        "operationId": "createReaction",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateReaction",
                "properties": {
                  "emoji": {
                    "description": "The emoji to react with, in shortcode or unicode format. For example, ':heart:' or a unicode emoji. Ignored in forums where reactions are always likes.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "poll_option_id": {
                    "description": "The unique identifier of a poll option to vote for. Only valid when the target message or post contains a poll.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "resource_id": {
                    "description": "The unique identifier of the message or forum post to react to.",
                    "type": "string"
                  }
                },
                "required": [
                  "resource_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "forum:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Create reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.create({ resource_id: 'resource_id' });\n\nconsole.log(reaction.id);"
          }
        ]
      }
    },
    "/reactions/{id}": {
      "delete": {
        "description": "Remove an emoji reaction from a message or forum post. Only the reaction author or a channel admin can remove a reaction.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `forum:read`\n - `livestream:chat:read`\n - `support_chat:read`",
        "operationId": "deleteReaction",
        "parameters": [
          {
            "description": "The unique identifier of the reaction to remove, or the identifier of the message or forum post to remove a reaction from. When passing a message or post ID, you must also provide the emoji argument.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "emoji",
            "required": false,
            "schema": {
              "description": "The emoji to remove, in shortcode or unicode format. For example, ':heart:' or a unicode emoji. Required when the id refers to a message or post instead of a reaction.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "forum:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Delete reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.delete('reac_xxxxxxxxxxxxxxxxxxxxxx');\n\nconsole.log(reaction);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing reaction.\n\nRequired permissions (one of):\n - `chat:read`\n - `dms:read`\n - `forum:read`\n - `livestream:chat:read`\n - `support_chat:read`",
        "operationId": "retrieveReaction",
        "parameters": [
          {
            "description": "The unique identifier of the reaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "chat:read"
            ]
          },
          {
            "bearerAuth": [
              "dms:read"
            ]
          },
          {
            "bearerAuth": [
              "forum:read"
            ]
          },
          {
            "bearerAuth": [
              "livestream:chat:read"
            ]
          },
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.retrieve('reac_xxxxxxxxxxxxxxxxxxxxxx');\n\nconsole.log(reaction.id);"
          }
        ]
      }
    },
    "/refunds": {
      "get": {
        "description": "Returns a paginated list of refunds, with optional filtering by payment, company, user, and creation date.\n\nRequired permissions:\n - `payment:basic:read`",
        "operationId": "listRefund",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payment_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to those associated with this specific payment. Mutually exclusive with company_id and user_id: provide exactly one.",
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to those associated with this specific user. Mutually exclusive with payment_id and company_id: provide exactly one. Requires a credential belonging to that user; any other credential receives 'You are not authorized'.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return refunds created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return refunds created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to those belonging to this company. Mutually exclusive with payment_id and user_id: provide exactly one.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Refund.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/RefundListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List refunds",
        "tags": [
          "Refunds"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const refundListResponse of client.refunds.list()) {\n  console.log(refundListResponse.id);\n}"
          }
        ]
      }
    },
    "/refunds/{id}": {
      "get": {
        "description": "Retrieves the details of an existing refund.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "retrieveRefund",
        "parameters": [
          {
            "description": "The unique identifier of the refund.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "rf_xxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refund"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve refund",
        "tags": [
          "Refunds"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst refund = await client.refunds.retrieve('rf_xxxxxxxxxxxxxxx');\n\nconsole.log(refund.id);"
          }
        ]
      }
    },
    "/resolution_center_cases": {
      "get": {
        "description": "Returns a paginated list of resolution center cases, with optional filtering by company, status, and creation date.\n\nRequired permissions:\n - `payment:resolution_center_case:read`",
        "operationId": "listResolutionCenterCase",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter by resolution center case status.",
              "items": {
                "$ref": "#/components/schemas/ResolutionCenterCaseStatuses"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return cases created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return cases created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list resolution center cases for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicResolution.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ResolutionCenterCaseListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "List resolution center cases",
        "tags": [
          "Resolution center cases"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const resolutionCenterCaseListResponse of client.resolutionCenterCases.list()) {\n  console.log(resolutionCenterCaseListResponse.id);\n}"
          }
        ]
      }
    },
    "/resolution_center_cases/{id}": {
      "get": {
        "description": "Retrieves the details of an existing resolution center case.\n\nRequired permissions:\n - `payment:resolution_center_case:read`",
        "operationId": "retrieveResolutionCenterCase",
        "parameters": [
          {
            "description": "The unique identifier of the resolution center case.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reso_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionCenterCase"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retrieve resolution center case",
        "tags": [
          "Resolution center cases"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst resolutionCenterCase = await client.resolutionCenterCases.retrieve('id');\n\nconsole.log(resolutionCenterCase.id);"
          }
        ]
      }
    },
    "/reviews": {
      "get": {
        "description": "Returns a paginated list of customer reviews for a specific product, with optional filtering by star rating and creation date.",
        "operationId": "listReview",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the product to list reviews for.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "min_stars",
            "required": false,
            "schema": {
              "description": "The minimum star rating to include in results, from 1 to 5 inclusive.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "max_stars",
            "required": false,
            "schema": {
              "description": "The maximum star rating to include in results, from 1 to 5 inclusive.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return reviews created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return reviews created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Review.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ReviewListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List reviews",
        "tags": [
          "Reviews"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const reviewListResponse of client.reviews.list({ product_id: 'prod_xxxxxxxxxxxxx' })) {\n  console.log(reviewListResponse.id);\n}"
          }
        ]
      }
    },
    "/reviews/{id}": {
      "get": {
        "description": "Retrieves the details of an existing review.",
        "operationId": "retrieveReview",
        "parameters": [
          {
            "description": "The unique identifier of the review to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "rev_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Retrieve review",
        "tags": [
          "Reviews"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst review = await client.reviews.retrieve('rev_xxxxxxxxxxxxxx');\n\nconsole.log(review.id);"
          }
        ]
      }
    },
    "/setup_intents": {
      "get": {
        "description": "Returns a paginated list of setup intents for a company, with optional filtering by creation date. A setup intent securely collects and stores a member's payment method for future use without charging them immediately.\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "listSetupIntent",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for ordering results, either ascending or descending."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return setup intents created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return setup intents created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list setup intents for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for SetupIntent.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/SetupIntentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:setup_intent:read",
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List setup intents",
        "tags": [
          "Setup intents"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const setupIntentListResponse of client.setupIntents.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(setupIntentListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Save a buyer's payment method for later without charging it. Provide a confirmation token for a method the buyer just supplied, or an existing payment method to re-verify. The buyer may still have a step to complete — 3D Secure, a hosted enrollment, linking a bank account — so poll the setup intent's status endpoint for what to do next.\n\nRequired permissions:\n - `payment:charge`\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "createSetupIntent",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateSetupIntent",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateSetupIntent",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to save the payment method for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "confirmation_token": {
                        "description": "A confirmation token ID (ctok_) describing a payment method the buyer just supplied. Provide this or payment_method_id, not both.",
                        "example": "ctok_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "currency": {
                        "description": "The currency the saved payment method will be used with. Controls which currency-specific payment methods are available. Defaults to usd.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the method belongs to. Ignored when the caller IS the buyer or the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the setup intent.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "confirmation_token"
                    ],
                    "title": "CreateSetupIntentInputWithConfirmationToken",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateSetupIntent",
                    "properties": {
                      "account_id": {
                        "description": "The ID of the company to save the payment method for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "currency": {
                        "description": "The currency the saved payment method will be used with. Controls which currency-specific payment methods are available. Defaults to usd.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "email": {
                        "description": "Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the method belongs to. Ignored when the caller IS the buyer or the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.",
                        "example": "buyer@example.com",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the setup intent.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "An existing payment method (payt_) to re-verify and save. Provide this or confirmation_token, not both.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "return_url": {
                        "description": "Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters.",
                        "example": "https://example.com/path",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "account_id",
                      "payment_method_id"
                    ],
                    "title": "CreateSetupIntentInputWithPaymentMethodId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A setup intent allows a user to save a payment method for future use without making an immediate purchase.",
                  "properties": {
                    "checkout_configuration": {
                      "description": "The checkout session configuration associated with this setup intent. Null if no checkout session was used.",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the checkout session.",
                          "example": "ch_xxxxxxxxxxxxxxx",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "client_secret": {
                      "description": "The credential the buyer's surface presents to poll this setup intent and set its return URL. Returned when the setup is created and still has something to finish — hold on to it, because a later read will not repeat it. Null when the setup settled on the spot and there is nothing left to authorize. It unlocks this setup intent and nothing else; treat it like a password for that one attempt.",
                      "example": "sint_xxxxxxxxxxxxxx_secret_v1_xxxx",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "company": {
                      "description": "The company that initiated this setup intent. Null if the company has been deleted.",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the company.",
                          "example": "biz_xxxxxxxxxxxxxx",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "created_at": {
                      "description": "The datetime the setup intent was created.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "error_message": {
                      "description": "A human-readable error message explaining why the setup intent failed. Null if no error occurred.",
                      "example": "Your card was declined.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "The unique identifier for the setup intent.",
                      "example": "sint_xxxxxxxxxxxxx",
                      "type": "string"
                    },
                    "member": {
                      "description": "The company member associated with this setup intent. Null if the user is not a member.",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the company member.",
                          "type": "string"
                        },
                        "user": {
                          "description": "The user for this member, if any.",
                          "properties": {
                            "email": {
                              "description": "The digital mailing address of the user.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "id": {
                              "description": "The unique identifier for the company member user.",
                              "type": "string"
                            },
                            "name": {
                              "description": "The user's full name.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "username": {
                              "description": "The whop username.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "email",
                            "name",
                            "username"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "user"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "metadata": {
                      "additionalProperties": true,
                      "description": "Custom key-value pairs attached to this setup intent. Null if no metadata was provided.",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "payment_method": {
                      "description": "The saved payment method created by this setup intent. Null if the setup has not completed successfully.",
                      "properties": {
                        "card": {
                          "description": "The card data associated with the payment method, if its a debit or credit card.",
                          "properties": {
                            "brand": {
                              "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/CardBrands"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "exp_month": {
                              "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "exp_year": {
                              "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "last4": {
                              "description": "The last four digits of the card number. Null if not available.",
                              "example": "4242",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "brand",
                            "last4",
                            "exp_month",
                            "exp_year"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "created_at": {
                          "description": "The datetime the payment token was created.",
                          "example": "2023-12-01T05:00:00.401Z",
                          "format": "date-time",
                          "type": "string"
                        },
                        "id": {
                          "description": "The unique identifier for the payment token.",
                          "example": "payt_xxxxxxxxxxxxx",
                          "type": "string"
                        },
                        "mailing_address": {
                          "description": "The mailing address associated with the payment method's user",
                          "properties": {
                            "city": {
                              "description": "The city of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "country": {
                              "description": "The country of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "line1": {
                              "description": "The line 1 of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "line2": {
                              "description": "The line 2 of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "description": "The name of the customer.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "description": "The postal code of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "description": "The state of the address.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "line1",
                            "line2",
                            "city",
                            "state",
                            "postal_code",
                            "country"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "payment_method_type": {
                          "$ref": "#/components/schemas/PaymentMethodTypes",
                          "description": "The payment method type of the payment method"
                        }
                      },
                      "required": [
                        "id",
                        "created_at",
                        "payment_method_type",
                        "card",
                        "mailing_address"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "status": {
                      "$ref": "#/components/schemas/SetupIntentStatuses",
                      "description": "The current status of the setup intent."
                    },
                    "three_ds_verified": {
                      "description": "Whether 3D Secure authentication was completed when this payment method was set up.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "created_at",
                    "error_message",
                    "company",
                    "checkout_configuration",
                    "member",
                    "payment_method",
                    "metadata",
                    "three_ds_verified",
                    "client_secret"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:charge",
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Create setup intent",
        "tags": [
          "Setup intents"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst setupIntent = await client.setupIntents.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  confirmation_token: 'ctok_xxxxxxxxxxxxxx',\n});\n\nconsole.log(setupIntent.id);"
          }
        ]
      }
    },
    "/setup_intents/{id}": {
      "get": {
        "description": "Retrieves the details of an existing setup intent.\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "retrieveSetupIntent",
        "parameters": [
          {
            "description": "The unique identifier of the setup intent.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "sint_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:setup_intent:read",
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve setup intent",
        "tags": [
          "Setup intents"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst setupIntent = await client.setupIntents.retrieve('sint_xxxxxxxxxxxxx');\n\nconsole.log(setupIntent.id);"
          }
        ]
      }
    },
    "/shipments": {
      "get": {
        "description": "Returns a paginated list of shipments, with optional filtering by payment, company, or user.\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`",
        "operationId": "listShipment",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payment_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those associated with this specific payment.",
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those for this specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those belonging to this company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Shipment.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ShipmentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "shipment:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List shipments",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const shipment of client.shipments.list()) {\n  console.log(shipment.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new shipment with a tracking code for a specific payment within a company.\n\nRequired permissions:\n - `shipment:create`\n - `payment:basic:read`",
        "operationId": "createShipment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateShipment",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create the shipment for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "payment_id": {
                    "description": "The unique identifier of the payment to associate the shipment with.",
                    "example": "pay_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "tracking_code": {
                    "description": "The carrier tracking code for the shipment, such as a USPS, UPS, or FedEx tracking number.",
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "payment_id",
                  "tracking_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "shipment:create",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Create shipment",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst shipment = await client.shipments.create({\n  payment_id: 'pay_xxxxxxxxxxxxxx',\n  tracking_number: '1Z999AA10123456784',\n});\n\nconsole.log(shipment.id);"
          }
        ]
      }
    },
    "/shipments/{id}": {
      "get": {
        "description": "Retrieves the details of an existing shipment.\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`",
        "operationId": "retrieveShipment",
        "parameters": [
          {
            "description": "The unique identifier of the shipment to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ship_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "shipment:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Retrieve shipment",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst shipment = await client.shipments.retrieve('id');\n\nconsole.log(shipment.id);"
          }
        ]
      }
    },
    "/stats/describe": {
      "get": {
        "description": "Describe available stats schema. Without resource returns root nodes and metrics. With resource returns node columns, associations, and available metrics.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "describeStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": false,
            "schema": {
              "description": "Resource path using : as separator (e.g., 'receipts', 'payments:membership', 'receipts:gross_revenue').",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "discriminator": {
                    "propertyName": "typename"
                  },
                  "oneOf": [
                    {
                      "description": "Root schema description showing available nodes, views, and metrics.",
                      "properties": {
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "metrics": {
                          "description": "Available metrics.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "description": "Available root nodes.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeRoot",
                          "description": "The typename of this object",
                          "type": "string"
                        },
                        "views": {
                          "description": "Available API resource views.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "typename",
                        "nodes",
                        "views",
                        "metrics",
                        "debug"
                      ],
                      "title": "DescribeRoot",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of a node (model) including its columns and associations.",
                      "properties": {
                        "associations": {
                          "description": "Available associations or child paths.",
                          "items": {
                            "description": "An association or child path available for navigation.",
                            "properties": {
                              "event_name": {
                                "description": "The event name (for event type).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "model": {
                                "description": "The associated model class name (for model associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "description": "The association name.",
                                "type": "string"
                              },
                              "path": {
                                "description": "The full path (for event associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "description": "The type (belongs_to, has_many, has_one, event, namespace).",
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "type",
                              "model",
                              "path",
                              "event_name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "columns": {
                          "description": "Available columns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "metrics": {
                          "description": "Available metrics for this node.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "node": {
                          "description": "The node path being described.",
                          "type": "string"
                        },
                        "sample": {
                          "description": "Sample data rows.",
                          "items": {
                            "additionalProperties": true,
                            "description": "Represents untyped JSON",
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "sortable_columns": {
                          "description": "Columns that can be used for sorting.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeNode",
                          "description": "The typename of this object",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "node",
                        "engine",
                        "columns",
                        "sortable_columns",
                        "associations",
                        "metrics",
                        "sample",
                        "debug"
                      ],
                      "title": "DescribeNode",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of a metric including its configuration and SQL.",
                      "properties": {
                        "breakdownable_columns": {
                          "description": "Columns that can be used for breakdowns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "filterable_columns": {
                          "description": "Columns that can be used for filtering.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "metric": {
                          "description": "The metric name.",
                          "type": "string"
                        },
                        "node": {
                          "description": "The node path this metric operates on.",
                          "type": "string"
                        },
                        "sql": {
                          "description": "The generated SQL query.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "supported_engines": {
                          "description": "Query engines that support this metric.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "timestamp_column": {
                          "description": "The timestamp column used for time filtering.",
                          "type": "string"
                        },
                        "typename": {
                          "const": "DescribeMetric",
                          "description": "The typename of this object",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "metric",
                        "node",
                        "engine",
                        "timestamp_column",
                        "supported_engines",
                        "filterable_columns",
                        "breakdownable_columns",
                        "sql",
                        "debug"
                      ],
                      "title": "DescribeMetric",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of an API resource view including its columns and associations.",
                      "properties": {
                        "associations": {
                          "description": "Available associations.",
                          "items": {
                            "description": "An association or child path available for navigation.",
                            "properties": {
                              "event_name": {
                                "description": "The event name (for event type).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "model": {
                                "description": "The associated model class name (for model associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "description": "The association name.",
                                "type": "string"
                              },
                              "path": {
                                "description": "The full path (for event associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "description": "The type (belongs_to, has_many, has_one, event, namespace).",
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "type",
                              "model",
                              "path",
                              "event_name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "columns": {
                          "description": "Available columns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "metrics": {
                          "description": "Available metrics.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "model": {
                          "description": "The underlying model class.",
                          "type": "string"
                        },
                        "resource": {
                          "description": "The API resource name.",
                          "type": "string"
                        },
                        "sample": {
                          "description": "Sample data rows.",
                          "items": {
                            "additionalProperties": true,
                            "description": "Represents untyped JSON",
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "sortable_columns": {
                          "description": "Columns that can be used for sorting.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeView",
                          "description": "The typename of this object",
                          "type": "string"
                        },
                        "view": {
                          "description": "The view name being described.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "view",
                        "resource",
                        "model",
                        "engine",
                        "columns",
                        "sortable_columns",
                        "associations",
                        "metrics",
                        "sample",
                        "debug"
                      ],
                      "title": "DescribeView",
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "stats:read"
            ]
          }
        ],
        "summary": "Describe stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/stats/metric": {
      "get": {
        "description": "Query an aggregated metric. Returns data grouped by period with optional breakdowns.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "metricStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:new_users').",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "description": "Time granularity (daily, weekly, monthly).",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "breakdowns",
            "required": false,
            "schema": {
              "description": "Columns to break down the metric by.",
              "items": {
                "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "filters",
            "required": false,
            "schema": {
              "additionalProperties": true,
              "description": "Key-value pairs to filter the data.",
              "type": "object"
            },
            "style": "deepObject"
          },
          {
            "explode": true,
            "in": "query",
            "name": "time_zone",
            "required": false,
            "schema": {
              "description": "IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. Only applies to ClickHouse metrics.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "description": "Start of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "description": "End of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Result from a stats query (raw, metric, or SQL).",
                  "properties": {
                    "columns": {
                      "description": "Column names in the order they appear in each data row.",
                      "items": {
                        "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "data": {
                      "description": "Array of data rows, where each row is an array of values matching the columns order.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents untyped JSON",
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "debug": {
                      "description": "Debug information including engine and SQL.",
                      "properties": {
                        "engine": {
                          "description": "The query engine used.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "request_id": {
                          "description": "Unique request identifier for debugging.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sql": {
                          "description": "The generated SQL query (with IDs sanitized).",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "engine",
                        "request_id",
                        "sql"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "node": {
                      "description": "The node path that was queried.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pagination": {
                      "description": "Pagination information.",
                      "properties": {
                        "next_cursor": {
                          "description": "Cursor for the next page of results.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "next_cursor"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "typename": {
                      "const": "Result",
                      "description": "The typename of this object",
                      "type": "string"
                    }
                  },
                  "required": [
                    "columns",
                    "data",
                    "debug",
                    "node",
                    "pagination",
                    "typename"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "stats:read"
            ]
          }
        ],
        "summary": "Metric stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/stats/raw": {
      "get": {
        "description": "Query raw data from a resource. Returns paginated rows with all columns.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "rawStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource path using : as separator (e.g., 'members', 'payments:membership').",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "description": "Start of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "description": "End of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Number of records to return (max 10000).",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "description": "Pagination cursor for next page.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "description": "Column to sort by.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "sort_direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "Sort direction (asc or desc)."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Result from a stats query (raw, metric, or SQL).",
                  "properties": {
                    "columns": {
                      "description": "Column names in the order they appear in each data row.",
                      "items": {
                        "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "data": {
                      "description": "Array of data rows, where each row is an array of values matching the columns order.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents untyped JSON",
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "debug": {
                      "description": "Debug information including engine and SQL.",
                      "properties": {
                        "engine": {
                          "description": "The query engine used.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "request_id": {
                          "description": "Unique request identifier for debugging.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sql": {
                          "description": "The generated SQL query (with IDs sanitized).",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "engine",
                        "request_id",
                        "sql"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "node": {
                      "description": "The node path that was queried.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pagination": {
                      "description": "Pagination information.",
                      "properties": {
                        "next_cursor": {
                          "description": "Cursor for the next page of results.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "next_cursor"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "columns",
                    "data",
                    "debug",
                    "node",
                    "pagination"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "stats:read"
            ]
          }
        ],
        "summary": "Raw stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/support_channels": {
      "get": {
        "description": "Returns a paginated list of support channels for a specific company, with optional filtering by resolution status and custom sorting.\n\nRequired permissions:\n - `support_chat:read`",
        "operationId": "listSupportChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SupportChannelView",
              "description": "Filter support channels by the authenticated user's role. Defaults to admin. When the caller is a company API key (no user), only admin-visible channels are returned."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "open",
            "required": false,
            "schema": {
              "description": "Whether to filter by open or resolved support channels. Set to true to only return channels awaiting a response, or false for resolved channels.",
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Direction",
              "description": "The sort direction for the results. Use 'asc' for oldest first or 'desc' for newest first."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MessageChannelOrder",
              "description": "The field to sort the support channels by, such as creation date or last message time."
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list support channels for. Includes channels of child companies. When omitted, returns support channels across all companies the user has access to.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/SupportChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "List support channels",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const supportChannelListResponse of client.supportChannels.list()) {\n  console.log(supportChannelListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Open a new support channel between a company team member and a customer. Returns the existing channel if one already exists for that user.\n\nRequired permissions:\n - `support_chat:create`",
        "operationId": "createSupportChannel",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateSupportChatForUser",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to create the support channel in.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "custom_name": {
                    "description": "Optional custom display name for the support channel.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notifications_enabled": {
                    "description": "Whether Whop app notifications are enabled for this support channel. Webhooks still fire.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The user ID (e.g. 'user_xxxxx') or username of the customer to open a support channel for.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "account_id",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "support_chat:create"
            ]
          }
        ],
        "summary": "Create support channel",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst supportChannel = await client.supportChannels.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(supportChannel.id);"
          }
        ]
      }
    },
    "/support_channels/{id}": {
      "get": {
        "description": "Retrieves the details of an existing support channel.\n\nRequired permissions:\n - `support_chat:read`",
        "operationId": "retrieveSupportChannel",
        "parameters": [
          {
            "description": "The unique identifier of the support channel to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportChannel"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve support channel",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst supportChannel = await client.supportChannels.retrieve('id');\n\nconsole.log(supportChannel.id);"
          }
        ]
      }
    },
    "/topups": {
      "post": {
        "description": "Add funds to a company's platform balance by charging a stored payment method. Top-ups have no fees or taxes and do not count as revenue.\n\nRequired permissions:\n - `payment:charge`",
        "operationId": "createTopup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateTopup",
                "properties": {
                  "account_id": {
                    "description": "The unique identifier of the company to add funds to, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "amount": {
                    "description": "The amount to add to the balance in the specified currency. For example, 50.00 for $50.00 USD.",
                    "example": 6.9,
                    "type": "number"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The currency for the top-up amount, such as 'usd'."
                  },
                  "payment_method_id": {
                    "description": "The unique identifier of the stored payment method to charge for the top-up.",
                    "example": "pmt_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "account_id",
                  "currency",
                  "payment_method_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payment:charge"
            ]
          }
        ],
        "summary": "Create topup",
        "tags": [
          "Topups"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst topup = await client.topups.create({\n  amount: 6.9,\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  currency: 'usd',\n  payment_method_id: 'pmt_xxxxxxxxxxxxxx',\n});\n\nconsole.log(topup.id);"
          }
        ]
      }
    },
    "/verifications": {
      "get": {
        "description": "Returns a list of identity verifications for a payout account, ordered by most recent first.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "listVerification",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payout_account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the payout account to list verifications for.",
              "example": "poact_xxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Verification.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/VerificationListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "List verifications",
        "tags": [
          "Verifications"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verifications = await client.verifications.list({ account_id: 'account_id' });\n\nconsole.log(verifications.data);"
          }
        ]
      }
    },
    "/verifications/{id}": {
      "get": {
        "description": "Retrieves the details of an existing verification.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrieveVerification",
        "parameters": [
          {
            "description": "The unique identifier of the verification to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "verf_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve verification",
        "tags": [
          "Verifications"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verification = await client.verifications.retrieve('id');\n\nconsole.log(verification.id);"
          }
        ]
      }
    },
    "/webhooks": {
      "get": {
        "description": "Returns a paginated list of webhook endpoints configured for a company, ordered by most recently created.\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "listWebhook",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "app_id",
            "required": false,
            "schema": {
              "description": "Only return webhooks attached to this app. Omit to list the company's own webhooks.",
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list webhooks for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Webhook.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const webhookListResponse of client.webhooks.list({ account_id: 'account_id' })) {\n  console.log(webhookListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a new webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "createWebhook",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateWebhook",
                "properties": {
                  "api_version": {
                    "description": "The API version for this webhook",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ApiVersion"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the webhook's payloads are pinned to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Only applies to v1 webhooks. Omit to leave the webhook unpinned on the legacy payload shape.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "child_resource_events": {
                    "description": "Whether or not to send events for child resources. For example, if the webhook is created for a Company, enabling this will only send events from the Company's sub-merchants (child companies).",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "enabled": {
                    "description": "Whether or not the webhook is enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "events": {
                    "description": "The events to send the webhook for.",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEvent"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "resource_id": {
                    "description": "The resource to create the webhook for. By default this will use current company",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "description": "The URL to send the webhook to.",
                    "example": "https://example.com/path",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
                  "properties": {
                    "api_version": {
                      "$ref": "#/components/schemas/ApiVersion",
                      "description": "The API version used to format payloads sent to this webhook endpoint."
                    },
                    "api_version_date": {
                      "description": "The dated API version (Api-Version-Date) that v1 payloads for this endpoint are pinned to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Null when unpinned — legacy (v2/v5) webhooks, and v1 webhooks on the legacy payload shape.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "child_resource_events": {
                      "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
                      "type": "boolean"
                    },
                    "created_at": {
                      "description": "The datetime the webhook was created.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "enabled": {
                      "description": "Whether this webhook endpoint is currently active and receiving events.",
                      "type": "boolean"
                    },
                    "events": {
                      "description": "The list of event types this webhook is subscribed to.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "type": "array"
                    },
                    "id": {
                      "description": "The unique identifier for the webhook.",
                      "example": "hook_xxxxxxxxxxxxx",
                      "type": "string"
                    },
                    "resource_id": {
                      "description": "The ID of the resource (company or product) this webhook is attached to.",
                      "type": "string"
                    },
                    "testable_events": {
                      "description": "The subset of subscribed event types that support sending test payloads.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "type": "array"
                    },
                    "url": {
                      "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
                      "example": "https://example.com/path",
                      "type": "string"
                    },
                    "webhook_secret": {
                      "description": "The secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic. Returned on the create response and to interactive dashboard sessions; empty for API-key and OAuth callers on later reads.",
                      "example": "whsec_abc123def456",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "enabled",
                    "events",
                    "api_version",
                    "api_version_date",
                    "created_at",
                    "child_resource_events",
                    "webhook_secret",
                    "resource_id",
                    "testable_events"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Create webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.create({ url: 'https://example.com/hooks' });\n\nconsole.log(webhook.id);"
          }
        ]
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "description": "Deletes a webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "description": "The ID of the webhook to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Delete webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.delete('id');\n\nconsole.log(webhook.id);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing webhook.\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "retrieveWebhook",
        "parameters": [
          {
            "description": "The unique identifier of the webhook to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Retrieve webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.retrieve('id');\n\nconsole.log(webhook.id);"
          }
        ]
      },
      "patch": {
        "description": "Updates a webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "updateWebhook",
        "parameters": [
          {
            "description": "The ID of the Webhook to update",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateWebhook",
                "properties": {
                  "api_version": {
                    "description": "The API version for this webhook",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ApiVersion"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) to pin this webhook's payloads to: events serialize exactly like a REST read at this version (the native serializer where the resource has one). Only applies to v1 webhooks. Pass null to unpin, returning to the legacy payload shape.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "child_resource_events": {
                    "description": "Whether or not to send events for child resources.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "enabled": {
                    "description": "Whether or not the webhook is enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "events": {
                    "description": "The events to send the webhook for.",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEvent"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "url": {
                    "description": "The URL to send the webhook to.",
                    "example": "https://example.com/path",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Update webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.update('id');\n\nconsole.log(webhook.id);"
          }
        ]
      }
    },
    "/webhooks/{id}/test": {
      "post": {
        "description": "Tests a webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "testWebhook",
        "parameters": [
          {
            "description": "The ID of the webhook to test.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for TestWebhookV2",
                "properties": {
                  "event": {
                    "$ref": "#/components/schemas/WebhookEvent",
                    "description": "The event to test the webhook for."
                  }
                },
                "required": [
                  "event"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The response of a testing a webhook",
                  "properties": {
                    "body": {
                      "additionalProperties": true,
                      "description": "The body of the webhook response",
                      "type": "object"
                    },
                    "status": {
                      "description": "The HTTP response code of this request",
                      "example": 42,
                      "type": "integer"
                    },
                    "success": {
                      "description": "Whether or not the webhook test was successful",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "status",
                    "body",
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Send test event",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.webhooks.test('id', { event: 'payment.succeeded' });\n\nconsole.log(response.body);"
          }
        ]
      }
    },
    "/webhooks/{webhook_id}/deliveries": {
      "get": {
        "description": "Returns a paginated list of delivery attempts for a webhook, ordered by most recent first. Includes the request payload, response body, response code, and timing for each attempt.\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "deliveriesWebhook",
        "parameters": [
          {
            "description": "The unique identifier of the webhook to list deliveries for.",
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": "integer"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for WebhookLog.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "A webhook log entry containing the request and response details",
                        "properties": {
                          "request_body": {
                            "additionalProperties": true,
                            "description": "The request body sent to the webhook endpoint",
                            "type": "object"
                          },
                          "resource_id": {
                            "description": "The ID of the resource that triggered the webhook",
                            "type": "string"
                          },
                          "response_body": {
                            "additionalProperties": true,
                            "description": "The response body received from the webhook endpoint",
                            "type": "object"
                          },
                          "response_code": {
                            "description": "The HTTP response code received from the webhook endpoint",
                            "example": 42,
                            "type": "integer"
                          },
                          "sent_at": {
                            "description": "The timestamp when the webhook was sent",
                            "example": "2023-12-01T05:00:00.401Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "total_time": {
                            "description": "The total time taken to send the webhook request in seconds",
                            "example": 6.9,
                            "type": "number"
                          }
                        },
                        "required": [
                          "request_body",
                          "resource_id",
                          "response_body",
                          "response_code",
                          "sent_at",
                          "total_time"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "description": "Information to aid in pagination.",
                      "properties": {
                        "end_cursor": {
                          "description": "When paginating forwards, the cursor to continue.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_next_page": {
                          "description": "When paginating forwards, are there more items?",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "end_cursor",
                        "has_next_page"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "A successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "parameter_missing",
                    "message": "Missing required parameter: amount.",
                    "param": "amount",
                    "type": "invalid_request_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Invalid or missing API key",
                    "type": "unauthorized"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "You do not have permission to access this resource",
                    "type": "forbidden"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "Resource not found",
                    "type": "not_found"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not found"
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Verification required"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": null
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Too many requests"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "message": "An unexpected error occurred",
                    "type": "internal_server_error"
                  }
                },
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "description": "A short string indicating the specific error code, e.g. 'parameter_missing', 'parameter_invalid', 'invalid_json'",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "description": "The parameter that caused the error, if applicable",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "message"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "List deliveries",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer"
      }
    }
  },
  "servers": [
    {
      "description": "Production Whop API",
      "url": "https://api.whop.com/api/v1"
    },
    {
      "description": "Sandbox Whop API",
      "url": "https://sandbox-api.whop.com/api/v1"
    }
  ],
  "tags": [
    {
      "description": "Products",
      "name": "Products"
    },
    {
      "description": "Payments",
      "name": "Payments"
    },
    {
      "description": "Refunds",
      "name": "Refunds"
    },
    {
      "description": "Disputes",
      "name": "Disputes"
    },
    {
      "description": "Dispute alerts",
      "name": "Dispute alerts"
    },
    {
      "description": "Resolution center cases",
      "name": "Resolution center cases"
    },
    {
      "description": "Checkout configurations",
      "name": "Checkout configurations"
    },
    {
      "description": "Setup intents",
      "name": "Setup intents"
    },
    {
      "description": "Payment methods",
      "name": "Payment methods"
    },
    {
      "description": "Invoices",
      "name": "Invoices"
    },
    {
      "description": "Promo codes",
      "name": "Promo codes"
    },
    {
      "description": "Card transactions",
      "name": "Card transactions"
    },
    {
      "description": "Ledger accounts",
      "name": "Ledger accounts"
    },
    {
      "description": "Withdrawals",
      "name": "Withdrawals"
    },
    {
      "description": "Payout methods",
      "name": "Payout methods"
    },
    {
      "description": "Verifications",
      "name": "Verifications"
    },
    {
      "description": "Identity profiles",
      "name": "Identity profiles"
    },
    {
      "description": "Payout accounts",
      "name": "Payout accounts"
    },
    {
      "description": "Topups",
      "name": "Topups"
    },
    {
      "description": "Companies",
      "name": "Companies"
    },
    {
      "description": "Authorized users",
      "name": "Authorized users"
    },
    {
      "description": "Fee markups",
      "name": "Fee markups"
    },
    {
      "description": "Members",
      "name": "Members"
    },
    {
      "description": "Memberships",
      "name": "Memberships"
    },
    {
      "description": "Leads",
      "name": "Leads"
    },
    {
      "description": "Entries",
      "name": "Entries"
    },
    {
      "description": "Shipments",
      "name": "Shipments"
    },
    {
      "description": "Reviews",
      "name": "Reviews"
    },
    {
      "description": "Company token transactions",
      "name": "Company token transactions"
    },
    {
      "description": "Affiliates",
      "name": "Affiliates"
    },
    {
      "description": "Experiences",
      "name": "Experiences"
    },
    {
      "description": "Forums",
      "name": "Forums"
    },
    {
      "description": "Forum posts",
      "name": "Forum posts"
    },
    {
      "description": "Chat channels",
      "name": "Chat channels"
    },
    {
      "description": "Support channels",
      "name": "Support channels"
    },
    {
      "description": "Messages",
      "name": "Messages"
    },
    {
      "description": "Reactions",
      "name": "Reactions"
    },
    {
      "description": "Dm members",
      "name": "Dm members"
    },
    {
      "description": "Dm channels",
      "name": "Dm channels"
    },
    {
      "description": "Notifications",
      "name": "Notifications"
    },
    {
      "description": "Courses",
      "name": "Courses"
    },
    {
      "description": "Course chapters",
      "name": "Course chapters"
    },
    {
      "description": "Course lessons",
      "name": "Course lessons"
    },
    {
      "description": "Course students",
      "name": "Course students"
    },
    {
      "description": "Course lesson interactions",
      "name": "Course lesson interactions"
    },
    {
      "description": "Apps",
      "name": "Apps"
    },
    {
      "description": "Webhooks",
      "name": "Webhooks"
    },
    {
      "description": "App builds",
      "name": "App builds"
    },
    {
      "description": "Access tokens",
      "name": "Access tokens"
    },
    {
      "description": "Account links",
      "name": "Account links"
    },
    {
      "description": "Files",
      "name": "Files"
    },
    {
      "description": "Ai chats",
      "name": "Ai chats"
    },
    {
      "description": "Bounties",
      "name": "Bounties"
    },
    {
      "description": "Stats",
      "name": "Stats"
    },
    {
      "description": "Conversions",
      "name": "Conversions"
    },
    {
      "description": "Ad reports",
      "name": "Ad reports"
    }
  ],
  "webhooks": {
    "card_transaction.completed": {
      "post": {
        "description": "Sent when a card transaction is completed\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:card_transactions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "authorization_method": "ecommerce",
                  "card_id": "icrd_xxxxxxxxxxxxxx",
                  "cashback_usd_amount": 0.25,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "declined_reason": null,
                  "id": "citx_xxxxxxxxxxxxxx",
                  "international": false,
                  "local_amount": 12.5,
                  "memo": "Clay bars and microfiber restock",
                  "merchant_category": "Auto Parts & Accessories",
                  "merchant_category_code": "5533",
                  "merchant_icon_url": null,
                  "merchant_name": "Austin Detail Supply",
                  "posted_at": "2026-01-02T12:00:00.000Z",
                  "status": "completed",
                  "transaction_type": "spend",
                  "usd_amount": 12.5
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "card_transaction.completed"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CardTransaction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "card_transaction.completed",
                    "description": "The webhook event type",
                    "example": "card_transaction.completed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CardTransaction Completed",
        "tags": [
          "Card transactions"
        ]
      }
    },
    "card_transaction.created": {
      "post": {
        "description": "Sent when a card transaction is created\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:card_transactions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "authorization_method": "ecommerce",
                  "card_id": "icrd_xxxxxxxxxxxxxx",
                  "cashback_usd_amount": null,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "declined_reason": null,
                  "id": "citx_xxxxxxxxxxxxxx",
                  "international": false,
                  "local_amount": 12.5,
                  "memo": "Clay bars and microfiber restock",
                  "merchant_category": "Auto Parts & Accessories",
                  "merchant_category_code": "5533",
                  "merchant_icon_url": null,
                  "merchant_name": "Austin Detail Supply",
                  "posted_at": null,
                  "status": "pending",
                  "transaction_type": "spend",
                  "usd_amount": 12.5
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "card_transaction.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CardTransaction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "card_transaction.created",
                    "description": "The webhook event type",
                    "example": "card_transaction.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CardTransaction Created",
        "tags": [
          "Card transactions"
        ]
      }
    },
    "card_transaction.declined": {
      "post": {
        "description": "Sent when a card transaction is declined\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:card_transactions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "authorization_method": "ecommerce",
                  "card_id": "icrd_xxxxxxxxxxxxxx",
                  "cashback_usd_amount": 0,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "declined_reason": "Insufficient funds",
                  "id": "citx_xxxxxxxxxxxxxx",
                  "international": false,
                  "local_amount": 12.5,
                  "memo": "Clay bars and microfiber restock",
                  "merchant_category": "Auto Parts & Accessories",
                  "merchant_category_code": "5533",
                  "merchant_icon_url": null,
                  "merchant_name": "Austin Detail Supply",
                  "posted_at": null,
                  "status": "declined",
                  "transaction_type": "spend",
                  "usd_amount": 12.5
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "card_transaction.declined"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CardTransaction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "card_transaction.declined",
                    "description": "The webhook event type",
                    "example": "card_transaction.declined",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CardTransaction Declined",
        "tags": [
          "Card transactions"
        ]
      }
    },
    "card_transaction.reversed": {
      "post": {
        "description": "Sent when a card transaction is reversed\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:card_transactions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "authorization_method": "ecommerce",
                  "card_id": "icrd_xxxxxxxxxxxxxx",
                  "cashback_usd_amount": 0,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "declined_reason": null,
                  "id": "citx_xxxxxxxxxxxxxx",
                  "international": false,
                  "local_amount": 12.5,
                  "memo": "Clay bars and microfiber restock",
                  "merchant_category": "Auto Parts & Accessories",
                  "merchant_category_code": "5533",
                  "merchant_icon_url": null,
                  "merchant_name": "Austin Detail Supply",
                  "posted_at": "2026-01-02T12:00:00.000Z",
                  "status": "reversed",
                  "transaction_type": "spend",
                  "usd_amount": 12.5
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "card_transaction.reversed"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CardTransaction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "card_transaction.reversed",
                    "description": "The webhook event type",
                    "example": "card_transaction.reversed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CardTransaction Reversed",
        "tags": [
          "Card transactions"
        ]
      }
    },
    "card_transaction.updated": {
      "post": {
        "description": "Sent when a card transaction is updated\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:card_transactions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "authorization_method": "ecommerce",
                  "card_id": "icrd_xxxxxxxxxxxxxx",
                  "cashback_usd_amount": 0.25,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "declined_reason": null,
                  "id": "citx_xxxxxxxxxxxxxx",
                  "international": false,
                  "local_amount": 12.5,
                  "memo": "Clay bars and microfiber restock",
                  "merchant_category": "Auto Parts & Accessories",
                  "merchant_category_code": "5533",
                  "merchant_icon_url": null,
                  "merchant_name": "Austin Detail Supply",
                  "posted_at": "2026-01-02T12:00:00.000Z",
                  "status": "completed",
                  "transaction_type": "spend",
                  "usd_amount": 12.5
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "card_transaction.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CardTransaction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "card_transaction.updated",
                    "description": "The webhook event type",
                    "example": "card_transaction.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CardTransaction Updated",
        "tags": [
          "Card transactions"
        ]
      }
    },
    "chat.message.created": {
      "post": {
        "description": "Sent when a chat event is created\n\nRequired permissions:\n - `webhook_receive:chat`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "audience": {
                    "type": "channel",
                    "user_ids": [
                      "user_xxxxxxxxxxxxxx",
                      "user_xxxxxxxxxxxxxx"
                    ]
                  },
                  "channel": {
                    "experience_id": "exp_xxxxxxxxxxxxxx",
                    "id": "feed_xxxxxxxxxxxxxx",
                    "type": "chat"
                  },
                  "message": {
                    "content": "Hey, are you available for a **quick call**?",
                    "created_at": "2023-12-01T05:00:00.401Z",
                    "id": "some_string",
                    "is_edited": true,
                    "is_pinned": true,
                    "mentions": [
                      "some_string",
                      "some_string"
                    ],
                    "mentions_everyone": true,
                    "message_type": "regular",
                    "poll": {
                      "options": [
                        {
                          "id": "some_string",
                          "text": "some_string"
                        },
                        {
                          "id": "some_string",
                          "text": "some_string"
                        }
                      ]
                    },
                    "poll_votes": [
                      {
                        "count": 42,
                        "option_id": "some_string"
                      },
                      {
                        "count": 42,
                        "option_id": "some_string"
                      }
                    ],
                    "reaction_counts": [
                      {
                        "count": 42,
                        "emoji": "some_string"
                      },
                      {
                        "count": 42,
                        "emoji": "some_string"
                      }
                    ],
                    "replying_to_message_id": "some_string",
                    "updated_at": "2023-12-01T05:00:00.401Z",
                    "user": {
                      "id": "user_xxxxxxxxxxxxx",
                      "name": "John Doe",
                      "username": "johndoe42"
                    },
                    "view_count": 42
                  },
                  "reason": "channel_message"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "chat.message.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "properties": {
                      "audience": {
                        "properties": {
                          "type": {
                            "enum": [
                              "channel",
                              "users"
                            ],
                            "example": "channel",
                            "type": "string"
                          },
                          "user_ids": {
                            "items": {
                              "example": "user_xxxxxxxxxxxxxx",
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "channel": {
                        "properties": {
                          "experience_id": {
                            "example": "exp_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "example": "feed_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "chat",
                              "direct_message",
                              "support"
                            ],
                            "example": "chat",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ],
                        "type": "object"
                      },
                      "message": {
                        "$ref": "#/components/schemas/Message"
                      },
                      "reason": {
                        "example": "channel_message",
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason",
                      "audience",
                      "channel",
                      "message"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "chat.message.created",
                    "description": "The webhook event type",
                    "example": "chat.message.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Chat Message Created",
        "tags": [
          "Messages"
        ]
      }
    },
    "chat.reaction.created": {
      "post": {
        "description": "Sent when a chat event is created\n\nRequired permissions:\n - `webhook_receive:chat`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "audience": {
                    "type": "channel",
                    "user_ids": [
                      "user_xxxxxxxxxxxxxx",
                      "user_xxxxxxxxxxxxxx"
                    ]
                  },
                  "channel": {
                    "experience_id": "exp_xxxxxxxxxxxxxx",
                    "id": "feed_xxxxxxxxxxxxxx",
                    "type": "chat"
                  },
                  "message": {
                    "content": "Hey, are you available for a **quick call**?",
                    "created_at": "2023-12-01T05:00:00.401Z",
                    "id": "some_string",
                    "is_edited": true,
                    "is_pinned": true,
                    "mentions": [
                      "some_string",
                      "some_string"
                    ],
                    "mentions_everyone": true,
                    "message_type": "regular",
                    "poll": {
                      "options": [
                        {
                          "id": "some_string",
                          "text": "some_string"
                        },
                        {
                          "id": "some_string",
                          "text": "some_string"
                        }
                      ]
                    },
                    "poll_votes": [
                      {
                        "count": 42,
                        "option_id": "some_string"
                      },
                      {
                        "count": 42,
                        "option_id": "some_string"
                      }
                    ],
                    "reaction_counts": [
                      {
                        "count": 42,
                        "emoji": "some_string"
                      },
                      {
                        "count": 42,
                        "emoji": "some_string"
                      }
                    ],
                    "replying_to_message_id": "some_string",
                    "updated_at": "2023-12-01T05:00:00.401Z",
                    "user": {
                      "id": "user_xxxxxxxxxxxxx",
                      "name": "John Doe",
                      "username": "johndoe42"
                    },
                    "view_count": 42
                  },
                  "reaction": {
                    "emoji": ":heart:",
                    "id": "reac_xxxxxxxxxxxxxxxxxxxxxx",
                    "resource_id": "some_string",
                    "user": {
                      "id": "user_xxxxxxxxxxxxx",
                      "name": "John Doe",
                      "username": "johndoe42"
                    }
                  },
                  "reason": "message_reaction"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "chat.reaction.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "properties": {
                      "audience": {
                        "properties": {
                          "type": {
                            "enum": [
                              "channel",
                              "users"
                            ],
                            "example": "channel",
                            "type": "string"
                          },
                          "user_ids": {
                            "items": {
                              "example": "user_xxxxxxxxxxxxxx",
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "channel": {
                        "properties": {
                          "experience_id": {
                            "example": "exp_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "example": "feed_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "chat",
                              "direct_message",
                              "support"
                            ],
                            "example": "chat",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ],
                        "type": "object"
                      },
                      "message": {
                        "$ref": "#/components/schemas/Message"
                      },
                      "reaction": {
                        "$ref": "#/components/schemas/Reaction"
                      },
                      "reason": {
                        "example": "message_reaction",
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason",
                      "audience",
                      "channel",
                      "message",
                      "reaction"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "chat.reaction.created",
                    "description": "The webhook event type",
                    "example": "chat.reaction.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Chat Reaction Created",
        "tags": [
          "Reactions"
        ]
      }
    },
    "course_lesson_interaction.completed": {
      "post": {
        "description": "Sent when a course lesson interaction is completed\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`\n - `webhook_receive:courses`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "completed": true,
                  "course": {
                    "experience": {
                      "id": "exp_xxxxxxxxxxxxxx"
                    },
                    "id": "cors_xxxxxxxxxxxxx",
                    "title": "Introduction to Technical Analysis"
                  },
                  "created_at": "2023-12-01T05:00:00.401Z",
                  "id": "crsli_xxxxxxxxxxxx",
                  "lesson": {
                    "chapter": {
                      "id": "chap_xxxxxxxxxxxxx"
                    },
                    "id": "lesn_xxxxxxxxxxxxx",
                    "title": "Understanding Candlestick Patterns"
                  },
                  "user": {
                    "id": "user_xxxxxxxxxxxxx",
                    "name": "John Doe",
                    "username": "johndoe42"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "course_lesson_interaction.completed"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CourseLessonInteraction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "course_lesson_interaction.completed",
                    "description": "The webhook event type",
                    "example": "course_lesson_interaction.completed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CourseLessonInteraction Completed",
        "tags": [
          "Course lesson interactions"
        ]
      }
    },
    "dispute.created": {
      "post": {
        "description": "Sent when a dispute is created\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "access_activity_log": null,
                  "amount": 150,
                  "billing_address": null,
                  "cancellation_policy_attachment": null,
                  "cancellation_policy_disclosure": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_communication_attachment": null,
                  "customer_email_address": null,
                  "customer_name": null,
                  "editable": true,
                  "id": "dspt_xxxxxxxxxxxxxx",
                  "needs_response_by": "2026-01-01T12:00:00.000Z",
                  "notes": null,
                  "payment": {
                    "billing_reason": null,
                    "card_brand": null,
                    "card_last4": null,
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "dispute_alerted_at": null,
                    "id": "pay_xxxxxxxxxxxxxx",
                    "member": null,
                    "membership": null,
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "payment_instrument": null,
                    "payment_method_type": null,
                    "subtotal": null,
                    "total": null,
                    "usd_total": null,
                    "user": {
                      "email": null,
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "plan": null,
                  "product": null,
                  "product_description": null,
                  "reason": "fraudulent",
                  "reason_code": null,
                  "refund_policy_attachment": null,
                  "refund_policy_disclosure": null,
                  "refund_refusal_explanation": null,
                  "service_date": null,
                  "status": "needs_response",
                  "uncategorized_attachment": null,
                  "visa_rdr": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "dispute.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Dispute"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute.created",
                    "description": "The webhook event type",
                    "example": "dispute.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Dispute Created",
        "tags": [
          "Disputes"
        ]
      }
    },
    "dispute.updated": {
      "post": {
        "description": "Sent when a dispute is updated\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "access_activity_log": null,
                  "amount": 150,
                  "billing_address": null,
                  "cancellation_policy_attachment": null,
                  "cancellation_policy_disclosure": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_communication_attachment": null,
                  "customer_email_address": "marcus@shinetime.example",
                  "customer_name": "Dana Whitfield",
                  "editable": false,
                  "id": "dspt_xxxxxxxxxxxxxx",
                  "needs_response_by": "2026-01-01T12:00:00.000Z",
                  "notes": null,
                  "payment": {
                    "billing_reason": null,
                    "card_brand": null,
                    "card_last4": null,
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "dispute_alerted_at": null,
                    "id": "pay_xxxxxxxxxxxxxx",
                    "member": null,
                    "membership": null,
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "payment_instrument": null,
                    "payment_method_type": null,
                    "subtotal": null,
                    "total": null,
                    "usd_total": null,
                    "user": {
                      "email": null,
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "plan": null,
                  "product": null,
                  "product_description": "Two-day ceramic coating service, completed as scheduled on the booked date.",
                  "reason": "fraudulent",
                  "reason_code": null,
                  "refund_policy_attachment": null,
                  "refund_policy_disclosure": null,
                  "refund_refusal_explanation": null,
                  "service_date": "2026-01-01",
                  "status": "under_review",
                  "uncategorized_attachment": null,
                  "visa_rdr": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "dispute.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Dispute"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute.updated",
                    "description": "The webhook event type",
                    "example": "dispute.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Dispute Updated",
        "tags": [
          "Disputes"
        ]
      }
    },
    "dispute_alert.created": {
      "post": {
        "description": "Sent when a dispute alert is created\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `payment:dispute:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "alert_type": "dispute_rdr",
                  "amount": 25,
                  "charge_for_alert": true,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "dispute": null,
                  "id": "dspa_xxxxxxxxxxxxxx",
                  "payment": null,
                  "transaction_date": "2026-01-01T12:00:00.000Z"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "dispute_alert.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/DisputeAlert"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute_alert.created",
                    "description": "The webhook event type",
                    "example": "dispute_alert.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Dispute Alert Created",
        "tags": [
          "Dispute alerts"
        ]
      }
    },
    "entry.approved": {
      "post": {
        "description": "Sent when a entry is approved\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_field_responses": [
                    {
                      "answer": "2022 Tesla Model 3, white",
                      "id": "cfrp_xxxxxxxxxxxxxx",
                      "question": "What vehicle are we detailing?"
                    }
                  ],
                  "id": "entry_xxxxxxxxxxxxxx",
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "approved",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "entry.approved"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.approved",
                    "description": "The webhook event type",
                    "example": "entry.approved",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Approved",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.created": {
      "post": {
        "description": "Sent when a entry is created\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_field_responses": [
                    {
                      "answer": "2022 Tesla Model 3, white",
                      "id": "cfrp_xxxxxxxxxxxxxx",
                      "question": "What vehicle are we detailing?"
                    }
                  ],
                  "id": "entry_xxxxxxxxxxxxxx",
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "pending",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "entry.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.created",
                    "description": "The webhook event type",
                    "example": "entry.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Created",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.deleted": {
      "post": {
        "description": "Sent when a entry is deleted\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_field_responses": [
                    {
                      "answer": "2022 Tesla Model 3, white",
                      "id": "cfrp_xxxxxxxxxxxxxx",
                      "question": "What vehicle are we detailing?"
                    }
                  ],
                  "id": "entry_xxxxxxxxxxxxxx",
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "pending",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "entry.deleted"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.deleted",
                    "description": "The webhook event type",
                    "example": "entry.deleted",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Deleted",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.denied": {
      "post": {
        "description": "Sent when a entry is denied\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_field_responses": [
                    {
                      "answer": "2022 Tesla Model 3, white",
                      "id": "cfrp_xxxxxxxxxxxxxx",
                      "question": "What vehicle are we detailing?"
                    }
                  ],
                  "id": "entry_xxxxxxxxxxxxxx",
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "denied",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "entry.denied"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.denied",
                    "description": "The webhook event type",
                    "example": "entry.denied",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Denied",
        "tags": [
          "Entries"
        ]
      }
    },
    "identity_profile.updated": {
      "post": {
        "description": "Sent whenever an identity profile changes state — a verification is approved, needs action, or is rejected, or a Whop review opens or clears. Every other identity_profile event is also delivered as an identity_profile.updated, so you can subscribe to this single event and re-fetch the verification to read its current status.\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "id": "idpf_xxxxxxxxxxxxxx"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "identity_profile.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "description": "The identity profile that changed. Re-fetch `GET /api/v1/verifications` to read its current, access-scoped state.",
                    "properties": {
                      "id": {
                        "description": "The identity profile id.",
                        "example": "idpf_xxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "identity_profile.updated",
                    "description": "The webhook event type",
                    "example": "identity_profile.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "IdentityProfile Updated",
        "tags": [
          "Identity profiles"
        ]
      }
    },
    "invoice.created": {
      "post": {
        "description": "Sent when a invoice is created\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "automatically_finalizes_at": null,
                  "charge_buyer_fee": false,
                  "collection_method": "send_invoice",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "current_plan": {
                    "currency": "usd",
                    "description": "One maintenance wash per week, any vehicle on file.",
                    "formatted_price": "$50.00 / month",
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "customer_name": "Dana Whitfield",
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "email_address": "marcus@shinetime.example",
                  "fetch_invoice_token": "example_invoice_token",
                  "id": "inv_xxxxxxxxxxxxxx",
                  "line_items": [
                    {
                      "label": "Two-stage paint correction",
                      "position": 0,
                      "quantity": 1,
                      "total": 199,
                      "unit_price": 199
                    },
                    {
                      "label": "Interior shampoo add-on",
                      "position": 1,
                      "quantity": 1,
                      "total": 49,
                      "unit_price": 49
                    }
                  ],
                  "mailing_address": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "number": "INV-0001",
                  "pay_online_url": "https://whop.com/checkout/plan_xxxxxxxxxxxxxx",
                  "payment": null,
                  "payment_processing": false,
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "open",
                  "subscription_billing_anchor_at": null,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "invoice.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.created",
                    "description": "The webhook event type",
                    "example": "invoice.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Created",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.marked_uncollectible": {
      "post": {
        "description": "Sent when a invoice is marked uncollectible\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "automatically_finalizes_at": null,
                  "charge_buyer_fee": false,
                  "collection_method": "send_invoice",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "current_plan": {
                    "currency": "usd",
                    "description": "One maintenance wash per week, any vehicle on file.",
                    "formatted_price": "$50.00 / month",
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "customer_name": "Dana Whitfield",
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "email_address": "marcus@shinetime.example",
                  "fetch_invoice_token": "example_invoice_token",
                  "id": "inv_xxxxxxxxxxxxxx",
                  "line_items": [
                    {
                      "label": "Two-stage paint correction",
                      "position": 0,
                      "quantity": 1,
                      "total": 199,
                      "unit_price": 199
                    },
                    {
                      "label": "Interior shampoo add-on",
                      "position": 1,
                      "quantity": 1,
                      "total": 49,
                      "unit_price": 49
                    }
                  ],
                  "mailing_address": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "number": "INV-0001",
                  "pay_online_url": "https://whop.com/checkout/plan_xxxxxxxxxxxxxx",
                  "payment": null,
                  "payment_processing": false,
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "uncollectible",
                  "subscription_billing_anchor_at": null,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "invoice.marked_uncollectible"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.marked_uncollectible",
                    "description": "The webhook event type",
                    "example": "invoice.marked_uncollectible",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Marked uncollectible",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.paid": {
      "post": {
        "description": "Sent when a invoice is paid\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "automatically_finalizes_at": null,
                  "charge_buyer_fee": false,
                  "collection_method": "send_invoice",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "current_plan": {
                    "currency": "usd",
                    "description": "One maintenance wash per week, any vehicle on file.",
                    "formatted_price": "$50.00 / month",
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "customer_name": "Dana Whitfield",
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "email_address": "marcus@shinetime.example",
                  "fetch_invoice_token": "example_invoice_token",
                  "id": "inv_xxxxxxxxxxxxxx",
                  "line_items": [
                    {
                      "label": "Two-stage paint correction",
                      "position": 0,
                      "quantity": 1,
                      "total": 199,
                      "unit_price": 199
                    },
                    {
                      "label": "Interior shampoo add-on",
                      "position": 1,
                      "quantity": 1,
                      "total": 49,
                      "unit_price": 49
                    }
                  ],
                  "mailing_address": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "number": "INV-0001",
                  "pay_online_url": "https://whop.com/checkout/plan_xxxxxxxxxxxxxx",
                  "payment": null,
                  "payment_processing": false,
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "paid",
                  "subscription_billing_anchor_at": null,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "invoice.paid"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.paid",
                    "description": "The webhook event type",
                    "example": "invoice.paid",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Paid",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.past_due": {
      "post": {
        "description": "Sent when a invoice is past due\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "automatically_finalizes_at": null,
                  "charge_buyer_fee": false,
                  "collection_method": "send_invoice",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "current_plan": {
                    "currency": "usd",
                    "description": "One maintenance wash per week, any vehicle on file.",
                    "formatted_price": "$50.00 / month",
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "customer_name": "Dana Whitfield",
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "email_address": "marcus@shinetime.example",
                  "fetch_invoice_token": "example_invoice_token",
                  "id": "inv_xxxxxxxxxxxxxx",
                  "line_items": [
                    {
                      "label": "Two-stage paint correction",
                      "position": 0,
                      "quantity": 1,
                      "total": 199,
                      "unit_price": 199
                    },
                    {
                      "label": "Interior shampoo add-on",
                      "position": 1,
                      "quantity": 1,
                      "total": 49,
                      "unit_price": 49
                    }
                  ],
                  "mailing_address": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "number": "INV-0001",
                  "pay_online_url": "https://whop.com/checkout/plan_xxxxxxxxxxxxxx",
                  "payment": null,
                  "payment_processing": false,
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "past_due",
                  "subscription_billing_anchor_at": null,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "invoice.past_due"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.past_due",
                    "description": "The webhook event type",
                    "example": "invoice.past_due",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Past due",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.voided": {
      "post": {
        "description": "Sent when a invoice is voided\n\nRequired permissions:\n - `invoice:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `payment:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "automatically_finalizes_at": null,
                  "charge_buyer_fee": false,
                  "collection_method": "send_invoice",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "current_plan": {
                    "currency": "usd",
                    "description": "One maintenance wash per week, any vehicle on file.",
                    "formatted_price": "$50.00 / month",
                    "id": "plan_xxxxxxxxxxxxxx"
                  },
                  "customer_name": "Dana Whitfield",
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "email_address": "marcus@shinetime.example",
                  "fetch_invoice_token": "example_invoice_token",
                  "id": "inv_xxxxxxxxxxxxxx",
                  "line_items": [
                    {
                      "label": "Two-stage paint correction",
                      "position": 0,
                      "quantity": 1,
                      "total": 199,
                      "unit_price": 199
                    },
                    {
                      "label": "Interior shampoo add-on",
                      "position": 1,
                      "quantity": 1,
                      "total": 49,
                      "unit_price": 49
                    }
                  ],
                  "mailing_address": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "number": "INV-0001",
                  "pay_online_url": "https://whop.com/checkout/plan_xxxxxxxxxxxxxx",
                  "payment": null,
                  "payment_processing": false,
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "title": "Ceramic Coating Package"
                  },
                  "status": "void",
                  "subscription_billing_anchor_at": null,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "invoice.voided"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.voided",
                    "description": "The webhook event type",
                    "example": "invoice.voided",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Voided",
        "tags": [
          "Invoices"
        ]
      }
    },
    "ledger_account.funds_available": {
      "post": {
        "description": "Sent when a ledger account is funds available\n\nRequired permissions:\n - `company:balance:read`\n - `payout:account:read`\n - `webhook_receive:ledger_accounts`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "balances": [
                    {
                      "balance": 1837.5,
                      "currency": "usd",
                      "pending_balance": 245,
                      "reserve_balance": 0
                    }
                  ],
                  "id": "ldgr_xxxxxxxxxxxxxx",
                  "ledger_type": "primary",
                  "owner": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing",
                    "typename": "Company"
                  },
                  "payments_approval_status": null,
                  "payout_account_details": null,
                  "payout_quote_required": false,
                  "settlement_time_at": "2026-01-01T12:00:00.000Z",
                  "transfer_fee": 3,
                  "treasury_balance": null
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "ledger_account.funds_available"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/LedgerAccount"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "ledger_account.funds_available",
                    "description": "The webhook event type",
                    "example": "ledger_account.funds_available",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "LedgerAccount Funds available",
        "tags": [
          "Ledger accounts"
        ]
      }
    },
    "member.created": {
      "post": {
        "description": "Sent when a member is created\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `member:phone:read`\n - `webhook_receive:members`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "access_level": "customer",
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "company_token_balance": 0,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "id": "mber_xxxxxxxxxxxxxx",
                  "joined_at": "2026-01-01T12:00:00.000Z",
                  "most_recent_action": "joined",
                  "most_recent_action_at": "2026-01-01T12:00:00.000Z",
                  "phone": null,
                  "status": "joined",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total_spent": 0,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "member.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Member"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "member.created",
                    "description": "The webhook event type",
                    "example": "member.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Member Created",
        "tags": [
          "Members"
        ]
      }
    },
    "membership.activated": {
      "post": {
        "description": "Sent when a membership is activated\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "cancel_at_period_end": false,
                  "cancel_option": null,
                  "cancelation_status": null,
                  "canceled_at": null,
                  "cancellation_reason": null,
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "custom_field_responses": [],
                  "formatted_renewal_price": "$50.00 / month",
                  "id": "mem_xxxxxxxxxxxxxx",
                  "initial_price_paid": "$50.00",
                  "joined_at": "2026-01-01T12:00:00.000Z",
                  "license_key": null,
                  "manage_url": "https://whop.com/billing/manage/mber_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "metadata": {},
                  "payment_collection_paused": false,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "renewal_period_end": "2026-01-01T12:00:00.000Z",
                  "renewal_period_start": "2026-01-01T12:00:00.000Z",
                  "status": "active",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "profile_pic": "https://ui-avatars.com/api/",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "membership.activated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.activated",
                    "description": "The webhook event type",
                    "example": "membership.activated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Activated",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.cancel_at_period_end_changed": {
      "post": {
        "description": "Sent when a membership is cancel at period end changed\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "cancel_at_period_end": true,
                  "cancel_option": "too_expensive",
                  "cancelation_status": "canceling",
                  "canceled_at": "2026-01-01T12:00:00.000Z",
                  "cancellation_reason": "The monthly wash club is more than I can spend right now.",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "custom_field_responses": [],
                  "formatted_renewal_price": "$50.00 / month",
                  "id": "mem_xxxxxxxxxxxxxx",
                  "initial_price_paid": "$50.00",
                  "joined_at": "2026-01-01T12:00:00.000Z",
                  "license_key": null,
                  "manage_url": "https://whop.com/billing/manage/mber_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "metadata": {},
                  "payment_collection_paused": false,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "renewal_period_end": "2026-01-01T12:00:00.000Z",
                  "renewal_period_start": "2026-01-01T12:00:00.000Z",
                  "status": "active",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "profile_pic": "https://ui-avatars.com/api/",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "membership.cancel_at_period_end_changed"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.cancel_at_period_end_changed",
                    "description": "The webhook event type",
                    "example": "membership.cancel_at_period_end_changed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Cancel at period end changed",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.deactivated": {
      "post": {
        "description": "Sent when a membership is deactivated\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "cancel_at_period_end": false,
                  "cancel_option": "switching",
                  "cancelation_status": "left",
                  "canceled_at": "2026-01-01T12:00:00.000Z",
                  "cancellation_reason": "Moving out of Austin — no mobile detailing at the new place.",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "custom_field_responses": [],
                  "formatted_renewal_price": "$50.00 / month",
                  "id": "mem_xxxxxxxxxxxxxx",
                  "initial_price_paid": "$50.00",
                  "joined_at": "2026-01-01T12:00:00.000Z",
                  "license_key": null,
                  "manage_url": "https://whop.com/billing/manage/mber_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "metadata": {},
                  "payment_collection_paused": false,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "renewal_period_end": "2026-01-01T12:00:00.000Z",
                  "renewal_period_start": "2026-01-01T12:00:00.000Z",
                  "status": "canceled",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "profile_pic": "https://ui-avatars.com/api/",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "membership.deactivated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.deactivated",
                    "description": "The webhook event type",
                    "example": "membership.deactivated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Deactivated",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.trial_ending_soon": {
      "post": {
        "description": "Sent when a membership is trial ending soon\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "cancel_at_period_end": false,
                  "cancel_option": null,
                  "cancelation_status": null,
                  "canceled_at": null,
                  "cancellation_reason": null,
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "custom_field_responses": [],
                  "formatted_renewal_price": "$50.00 / month",
                  "id": "mem_xxxxxxxxxxxxxx",
                  "initial_price_paid": "$50.00",
                  "joined_at": "2026-01-01T12:00:00.000Z",
                  "license_key": null,
                  "manage_url": "https://whop.com/billing/manage/mber_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx"
                  },
                  "metadata": {},
                  "payment_collection_paused": false,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "renewal_period_end": "2026-01-01T12:00:00.000Z",
                  "renewal_period_start": "2026-01-01T12:00:00.000Z",
                  "status": "trialing",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "profile_pic": "https://ui-avatars.com/api/",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "membership.trial_ending_soon"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.trial_ending_soon",
                    "description": "The webhook event type",
                    "example": "membership.trial_ending_soon",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Trial ending soon",
        "tags": [
          "Memberships"
        ]
      }
    },
    "payment.authorized": {
      "post": {
        "description": "Sent when a payment is authorized\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": "visa",
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": "4242",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": null,
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "drafted"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": null,
                  "paid_at": null,
                  "payment_instrument": {
                    "card": {
                      "brand": "visa",
                      "last4": "4242"
                    },
                    "display_name": "Visa •••• 4242",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "card"
                  },
                  "payment_method": null,
                  "payment_method_type": "card",
                  "payments_failed": 0,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": false,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": false,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "authorized",
                  "substatus": "requires_capture",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": true
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.authorized"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.authorized",
                    "description": "The webhook event type",
                    "example": "payment.authorized",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Authorized",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.canceled": {
      "post": {
        "description": "Sent when a payment is canceled\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": "visa",
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": "4242",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": null,
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "drafted"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": null,
                  "paid_at": null,
                  "payment_instrument": {
                    "card": {
                      "brand": "visa",
                      "last4": "4242"
                    },
                    "display_name": "Visa •••• 4242",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "card"
                  },
                  "payment_method": null,
                  "payment_method_type": "card",
                  "payments_failed": 0,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": false,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": false,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "void",
                  "substatus": "canceled",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.canceled"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.canceled",
                    "description": "The webhook event type",
                    "example": "payment.canceled",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Canceled",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.created": {
      "post": {
        "description": "Sent when a payment is created\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": "visa",
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": "4242",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": null,
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "active"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": null,
                  "paid_at": null,
                  "payment_instrument": {
                    "card": {
                      "brand": "visa",
                      "last4": "4242"
                    },
                    "display_name": "Visa •••• 4242",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "card"
                  },
                  "payment_method": null,
                  "payment_method_type": "card",
                  "payments_failed": 0,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": false,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": true,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "open",
                  "substatus": "incomplete",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.created",
                    "description": "The webhook event type",
                    "example": "payment.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Created",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.failed": {
      "post": {
        "description": "Sent when a payment is failed\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": "visa",
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": "4242",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": "Your card was declined.",
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": "2026-01-01T12:00:00.000Z",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "active"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": "2026-01-01T12:00:00.000Z",
                  "paid_at": null,
                  "payment_instrument": {
                    "card": {
                      "brand": "visa",
                      "last4": "4242"
                    },
                    "display_name": "Visa •••• 4242",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "card"
                  },
                  "payment_method": null,
                  "payment_method_type": "card",
                  "payments_failed": 1,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": false,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": true,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "open",
                  "substatus": "failed",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.failed"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.failed",
                    "description": "The webhook event type",
                    "example": "payment.failed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Failed",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.pending": {
      "post": {
        "description": "Sent when a payment is pending\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": null,
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": null,
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": null,
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "active"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": null,
                  "paid_at": null,
                  "payment_instrument": {
                    "card": null,
                    "display_name": "ACH",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/ach/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/ach/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/ach/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/ach/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/ach/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/ach/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/ach/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/ach/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/ach/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/ach/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/ach/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/ach/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/ach/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/ach/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/ach/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/ach/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "us_bank_account"
                  },
                  "payment_method": null,
                  "payment_method_type": "us_bank_account",
                  "payments_failed": 0,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": false,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": false,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "pending",
                  "substatus": "pending",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.pending"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.pending",
                    "description": "The webhook event type",
                    "example": "payment.pending",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Pending",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.succeeded": {
      "post": {
        "description": "Sent when a payment is succeeded\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `shipment:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount_after_fees": 50,
                  "application_fee": null,
                  "auto_refunded": false,
                  "billing_address": null,
                  "billing_reason": "subscription_cycle",
                  "card_brand": "visa",
                  "card_exp_month": null,
                  "card_exp_year": null,
                  "card_last4": "4242",
                  "checkout_configuration_id": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "customer_phone": null,
                  "decline_code": null,
                  "dispute_alerted_at": null,
                  "disputes": [],
                  "failure_message": null,
                  "fees": [],
                  "financing_installments_count": null,
                  "financing_transactions": [],
                  "id": "pay_xxxxxxxxxxxxxx",
                  "last_payment_attempt": null,
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "phone": null
                  },
                  "membership": {
                    "id": "mem_xxxxxxxxxxxxxx",
                    "phone_number": null,
                    "status": "active"
                  },
                  "metadata": {},
                  "needs_tracking": false,
                  "next_payment_attempt": null,
                  "paid_at": "2026-01-01T12:00:00.000Z",
                  "payment_instrument": {
                    "card": {
                      "brand": "visa",
                      "last4": "4242"
                    },
                    "display_name": "Visa •••• 4242",
                    "icons": {
                      "card": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_dark_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_dark_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_dark_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/card_light_30.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/card_light_60.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/card_light_120.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/card_light.svg"
                        }
                      },
                      "square": {
                        "dark": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_dark_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_dark_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_dark_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_dark.svg"
                        },
                        "light": {
                          "png_1x": "https://content.whop.com/payment_methods/visa/icons/square_light_32.png",
                          "png_2x": "https://content.whop.com/payment_methods/visa/icons/square_light_64.png",
                          "png_4x": "https://content.whop.com/payment_methods/visa/icons/square_light_128.png",
                          "svg": "https://content.whop.com/payment_methods/visa/icons/square_light.svg"
                        }
                      }
                    },
                    "installment_count": null,
                    "payment_method_type": "card"
                  },
                  "payment_method": null,
                  "payment_method_type": "card",
                  "payments_failed": 0,
                  "plan": {
                    "id": "plan_xxxxxxxxxxxxxx",
                    "internal_notes": "Maintenance tier. Upsell the interior shampoo add-on at renewal.",
                    "metadata": {}
                  },
                  "product": {
                    "id": "prod_xxxxxxxxxxxxxx",
                    "metadata": {},
                    "route": "ceramic-coating-package",
                    "title": "Ceramic Coating Package"
                  },
                  "promo_code": null,
                  "recovery_url": null,
                  "refundable": true,
                  "refunded_amount": 0,
                  "refunded_at": null,
                  "refunds": [],
                  "resolutions": [],
                  "retryable": false,
                  "risk_score": null,
                  "risk_signals": null,
                  "settlement_amount": 50,
                  "settlement_currency": "usd",
                  "settlement_exchange_rate": null,
                  "settlement_time_at": null,
                  "shipment": null,
                  "shipping_address": null,
                  "status": "paid",
                  "substatus": "succeeded",
                  "subtotal": 50,
                  "tax_amount": null,
                  "tax_behavior": null,
                  "tax_refunded_amount": 0,
                  "three_ds_verified": false,
                  "total": 50,
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "usd_total": 50,
                  "user": {
                    "email": "marcus@shinetime.example",
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "verification_checks": null,
                  "voidable": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payment.succeeded"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.succeeded",
                    "description": "The webhook event type",
                    "example": "payment.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Succeeded",
        "tags": [
          "Payments"
        ]
      }
    },
    "payout_account.status_updated": {
      "post": {
        "description": "Sent when a payout account is status updated\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:payout_accounts`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "address": {
                    "city": "Austin",
                    "country": "USA",
                    "line1": "2201 Barton Springs Rd",
                    "line2": "Suite 4",
                    "postal_code": "78704",
                    "state": "TX"
                  },
                  "business_name": null,
                  "business_representative": {
                    "date_of_birth": "1988-04-12",
                    "first_name": "Marcus",
                    "last_name": "Webb",
                    "middle_name": null
                  },
                  "email": "marcus@shinetime.example",
                  "id": "poact_xxxxxxxxxxxxxx",
                  "latest_verification": null,
                  "phone": "+1 512 555 0194",
                  "status": "connected"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payout_account.status_updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutAccount"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payout_account.status_updated",
                    "description": "The webhook event type",
                    "example": "payout_account.status_updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "PayoutAccount Status updated",
        "tags": [
          "Payout accounts"
        ]
      }
    },
    "payout_method.created": {
      "post": {
        "description": "Sent when a payout method is created\n\nRequired permissions:\n - `payout:destination:read`\n - `webhook_receive:payout_methods`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "account_reference": "4483",
                  "company": null,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "destination": {
                    "category": "unknown",
                    "country_code": "USA",
                    "name": "Next Day Bank Deposit"
                  },
                  "id": "potk_xxxxxxxxxxxxxx",
                  "institution_name": "Frost Bank",
                  "is_default": true,
                  "nickname": "Shine Time business checking"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "payout_method.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutMethod"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payout_method.created",
                    "description": "The webhook event type",
                    "example": "payout_method.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "PayoutMethod Created",
        "tags": [
          "Payout methods"
        ]
      }
    },
    "product.created": {
      "post": {
        "description": "Sent when a product is created\n\nRequired permissions:\n - `access_pass:basic:read`\n - `webhook_receive:products`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_cta": "join",
                  "custom_cta_url": null,
                  "custom_statement_descriptor": null,
                  "description": "Two-stage paint correction, a three-year ceramic coating, and sealed wheel faces.",
                  "external_identifier": null,
                  "gallery_images": [],
                  "global_affiliate_percentage": 30,
                  "global_affiliate_status": "enabled",
                  "headline": "A showroom finish that lasts three years",
                  "id": "prod_xxxxxxxxxxxxxx",
                  "member_affiliate_percentage": 0,
                  "member_affiliate_status": "disabled",
                  "member_count": 0,
                  "metadata": {},
                  "owner_user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "product_tax_code": null,
                  "published_reviews_count": 0,
                  "route": "ceramic-coating-package",
                  "title": "Ceramic Coating Package",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "verified": false,
                  "visibility": "visible"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "product.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "product.created",
                    "description": "The webhook event type",
                    "example": "product.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Product Created",
        "tags": [
          "Products"
        ]
      }
    },
    "product.deleted": {
      "post": {
        "description": "Sent when a product is deleted\n\nRequired permissions:\n - `access_pass:basic:read`\n - `webhook_receive:products`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "account": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_cta": null,
                  "custom_cta_url": null,
                  "custom_statement_descriptor": null,
                  "default_plan": null,
                  "description": "Two-stage paint correction, a three-year ceramic coating, and sealed wheel faces.",
                  "external_identifier": null,
                  "gallery_images": [],
                  "global_affiliate_percentage": 30,
                  "global_affiliate_status": "enabled",
                  "headline": "A showroom finish that lasts three years",
                  "id": "prod_xxxxxxxxxxxxxx",
                  "labels": [],
                  "marketplace_status": "not_available",
                  "member_affiliate_percentage": 0,
                  "member_affiliate_status": "disabled",
                  "member_count": 0,
                  "metadata": {},
                  "owner_user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "product_tax_code": null,
                  "published_reviews_count": 0,
                  "route": "ceramic-coating-package",
                  "title": "Ceramic Coating Package",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "verified": false,
                  "visibility": "visible"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "product.deleted"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "properties": {
                      "account": {
                        "description": "Account that sells this product.",
                        "example": {
                          "id": "biz_xxxxxxxxxxxxxx",
                          "route": "biz_xxxxxxxxxxxxxx",
                          "title": "Shine Time Auto Detailing"
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "created_at": {
                        "description": "When the product was created, as an ISO 8601 timestamp.",
                        "example": "2026-01-01T12:00:00.000Z",
                        "type": "string"
                      },
                      "custom_cta": {
                        "description": "Call-to-action button label shown on the product purchase page.",
                        "enum": [
                          "get_access",
                          "join",
                          "order_now",
                          "shop_now",
                          "call_now",
                          "donate_now",
                          "contact_us",
                          "sign_up",
                          "subscribe",
                          "purchase",
                          "get_offer",
                          "apply_now",
                          "complete_order",
                          null
                        ],
                        "example": "order_now",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "custom_cta_url": {
                        "description": "URL the call-to-action button links to instead of checkout.",
                        "example": "https://shinetime.example/book",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "custom_statement_descriptor": {
                        "description": "Custom text label on customer's bank statement.",
                        "example": "WHOP*SHINETIME",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "default_plan": {
                        "description": "Buyable plan to show and check out with. The configured default when that plan is buyable, otherwise the first buyable plan in product-page order. `null` when none is buyable.",
                        "oneOf": [
                          {
                            "properties": {
                              "billing_period": {
                                "description": "Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans.",
                                "example": 30,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "expiration_days": {
                                "description": "Access duration in days for expiration-based plans. `null` for plans without an expiration.",
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "id": {
                                "description": "Plan ID, prefixed `plan_`.",
                                "example": "plan_xxxxxxxxxxxxxx",
                                "type": "string"
                              },
                              "initial_price": {
                                "properties": {
                                  "amount": {
                                    "description": "The amount in major units, as an exact decimal string — `\"10.00\"` is ten dollars. A string so no float rounds it in transit.",
                                    "example": "-2.50",
                                    "type": "string"
                                  },
                                  "currency": {
                                    "description": "Three-letter ISO 4217 currency code, lowercase.",
                                    "example": "usd",
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "description": "How many decimal places the amount CARRIES — the precision the charge itself runs at.",
                                    "example": 2,
                                    "type": "integer"
                                  },
                                  "display_decimals": {
                                    "description": "How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.",
                                    "example": 2,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "currency",
                                  "amount",
                                  "decimals",
                                  "display_decimals"
                                ],
                                "type": "object"
                              },
                              "plan_type": {
                                "description": "Billing model for this plan: `one_time` or `renewal`.",
                                "enum": [
                                  "renewal",
                                  "one_time"
                                ],
                                "example": "renewal",
                                "type": "string"
                              },
                              "renewal_price": {
                                "properties": {
                                  "amount": {
                                    "description": "The amount in major units, as an exact decimal string — `\"10.00\"` is ten dollars. A string so no float rounds it in transit.",
                                    "example": "-2.50",
                                    "type": "string"
                                  },
                                  "currency": {
                                    "description": "Three-letter ISO 4217 currency code, lowercase.",
                                    "example": "usd",
                                    "type": "string"
                                  },
                                  "decimals": {
                                    "description": "How many decimal places the amount CARRIES — the precision the charge itself runs at.",
                                    "example": 2,
                                    "type": "integer"
                                  },
                                  "display_decimals": {
                                    "description": "How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.",
                                    "example": 2,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "currency",
                                  "amount",
                                  "decimals",
                                  "display_decimals"
                                ],
                                "type": "object"
                              },
                              "title": {
                                "description": "Plan display name shown to customers. `null` if no title has been set.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "unlimited_stock": {
                                "description": "Whether the plan has unlimited stock.",
                                "example": true,
                                "type": "boolean"
                              },
                              "visibility": {
                                "description": "Where this plan can be seen. `visible` plans appear on the product page.",
                                "enum": [
                                  "visible",
                                  "hidden",
                                  "archived",
                                  "quick_link"
                                ],
                                "example": "visible",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "plan_type",
                              "billing_period",
                              "initial_price",
                              "renewal_price",
                              "visibility",
                              "unlimited_stock",
                              "expiration_days"
                            ],
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": {
                        "description": "Written description displayed on the product page. `null` if none is set.",
                        "example": "Full interior extraction, leather conditioning, and an ozone odor treatment.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "external_identifier": {
                        "description": "External identifier stored on the product for your own reference.",
                        "example": "SHINE-CERAMIC-01",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "gallery_images": {
                        "items": {
                          "properties": {
                            "content_type": {
                              "description": "Uploaded file MIME type, such as image/jpeg.",
                              "example": "image/png",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "id": {
                              "description": "Gallery image ID.",
                              "example": "file_xxxxxxxxxxxxxx",
                              "type": "string"
                            },
                            "url": {
                              "description": "Pre-optimized URL for rendering this image on the client.",
                              "example": "https://whop-assets-example.s3.amazonaws.com/uploads/image/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "url",
                            "content_type"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "global_affiliate_percentage": {
                        "description": "Commission rate affiliates earn through the global affiliate program.",
                        "example": 10,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "global_affiliate_status": {
                        "description": "Enrollment status in the global affiliate program.",
                        "enum": [
                          "enabled",
                          "disabled",
                          null
                        ],
                        "example": "enabled",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "headline": {
                        "description": "Short marketing headline displayed on product page.",
                        "example": "Steam, shampoo, and odor removal in one visit",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "description": "Product ID, prefixed `prod_`.",
                        "example": "prod_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "labels": {
                        "items": {
                          "description": "Lowercased labels used to group products into collections. Filter the list endpoint by `labels` to fetch one collection.",
                          "example": "interior",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "marketplace_status": {
                        "description": "Listing state on the whop.com marketplace. `pending_review` means submitted and awaiting review; `live_marketplace` means approved and discoverable.",
                        "enum": [
                          "not_available",
                          "pending_review",
                          "live_marketplace"
                        ],
                        "example": "not_available",
                        "type": "string"
                      },
                      "member_affiliate_percentage": {
                        "description": "Commission rate members earn through the member affiliate program.",
                        "example": 5,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "member_affiliate_status": {
                        "description": "Enrollment status in the member affiliate program.",
                        "enum": [
                          "enabled",
                          "disabled",
                          null
                        ],
                        "example": "enabled",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_count": {
                        "description": "Active memberships for this product; 0 if public member counts are disabled.",
                        "example": 0,
                        "type": "number"
                      },
                      "metadata": {
                        "description": "Custom key-value pairs stored on the product.",
                        "example": {
                          "bay": "1",
                          "duration_hours": "4"
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "owner_user": {
                        "description": "User who owns the account selling this product.",
                        "example": {
                          "id": "user_xxxxxxxxxxxxxx",
                          "name": "Marcus Webb",
                          "username": "marcuswebb"
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "product_tax_code": {
                        "description": "Tax classification code for this product, or `null` if no tax code is set.",
                        "example": {
                          "id": "ptc_xxxxxxxxxxxxxx",
                          "name": "General - Digital Goods",
                          "product_type": "digital"
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "published_reviews_count": {
                        "description": "Published customer reviews for this product.",
                        "example": 0,
                        "type": "number"
                      },
                      "route": {
                        "description": "URL slug for the product's public link.",
                        "example": "interior-deep-clean",
                        "type": "string"
                      },
                      "title": {
                        "description": "Product display name shown to customers.",
                        "example": "Interior Deep Clean",
                        "type": "string"
                      },
                      "updated_at": {
                        "description": "When the product was last updated, as an ISO 8601 timestamp.",
                        "example": "2026-01-01T12:00:00.000Z",
                        "type": "string"
                      },
                      "verified": {
                        "description": "Whether the product has been verified by Whop.",
                        "example": false,
                        "type": "boolean"
                      },
                      "visibility": {
                        "description": "Whether the product is publicly visible, hidden, or archived.",
                        "example": "visible",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "created_at",
                      "updated_at",
                      "title",
                      "visibility",
                      "headline",
                      "description",
                      "verified",
                      "member_count",
                      "route",
                      "published_reviews_count",
                      "external_identifier",
                      "metadata",
                      "labels",
                      "account",
                      "default_plan",
                      "custom_cta",
                      "custom_cta_url",
                      "custom_statement_descriptor",
                      "global_affiliate_percentage",
                      "global_affiliate_status",
                      "member_affiliate_percentage",
                      "member_affiliate_status",
                      "product_tax_code",
                      "owner_user",
                      "marketplace_status",
                      "gallery_images"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "product.deleted",
                    "description": "The webhook event type",
                    "example": "product.deleted",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Product Deleted",
        "tags": [
          "Products"
        ]
      }
    },
    "product.published": {
      "post": {
        "description": "Sent when a product is published\n\nRequired permissions:\n - `access_pass:basic:read`\n - `webhook_receive:products`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_cta": "join",
                  "custom_cta_url": null,
                  "custom_statement_descriptor": null,
                  "description": "Two-stage paint correction, a three-year ceramic coating, and sealed wheel faces.",
                  "external_identifier": null,
                  "gallery_images": [],
                  "global_affiliate_percentage": 30,
                  "global_affiliate_status": "enabled",
                  "headline": "A showroom finish that lasts three years",
                  "id": "prod_xxxxxxxxxxxxxx",
                  "member_affiliate_percentage": 0,
                  "member_affiliate_status": "disabled",
                  "member_count": 0,
                  "metadata": {},
                  "owner_user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "product_tax_code": null,
                  "published_reviews_count": 0,
                  "route": "ceramic-coating-package",
                  "title": "Ceramic Coating Package",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "verified": false,
                  "visibility": "visible"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "product.published"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "product.published",
                    "description": "The webhook event type",
                    "example": "product.published",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Product Published",
        "tags": [
          "Products"
        ]
      }
    },
    "product.unpublished": {
      "post": {
        "description": "Sent when a product is unpublished\n\nRequired permissions:\n - `access_pass:basic:read`\n - `webhook_receive:products`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_cta": "join",
                  "custom_cta_url": null,
                  "custom_statement_descriptor": null,
                  "description": "Two-stage paint correction, a three-year ceramic coating, and sealed wheel faces.",
                  "external_identifier": null,
                  "gallery_images": [],
                  "global_affiliate_percentage": 30,
                  "global_affiliate_status": "enabled",
                  "headline": "A showroom finish that lasts three years",
                  "id": "prod_xxxxxxxxxxxxxx",
                  "member_affiliate_percentage": 0,
                  "member_affiliate_status": "disabled",
                  "member_count": 0,
                  "metadata": {},
                  "owner_user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "product_tax_code": null,
                  "published_reviews_count": 0,
                  "route": "ceramic-coating-package",
                  "title": "Ceramic Coating Package",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "verified": false,
                  "visibility": "hidden"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "product.unpublished"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "product.unpublished",
                    "description": "The webhook event type",
                    "example": "product.unpublished",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Product Unpublished",
        "tags": [
          "Products"
        ]
      }
    },
    "product.updated": {
      "post": {
        "description": "Sent when a product is updated\n\nRequired permissions:\n - `access_pass:basic:read`\n - `webhook_receive:products`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "route": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "custom_cta": "join",
                  "custom_cta_url": null,
                  "custom_statement_descriptor": null,
                  "description": "Two-stage paint correction, a three-year ceramic coating, and sealed wheel faces.",
                  "external_identifier": null,
                  "gallery_images": [],
                  "global_affiliate_percentage": 30,
                  "global_affiliate_status": "enabled",
                  "headline": "A showroom finish that lasts three years",
                  "id": "prod_xxxxxxxxxxxxxx",
                  "member_affiliate_percentage": 0,
                  "member_affiliate_status": "disabled",
                  "member_count": 0,
                  "metadata": {},
                  "owner_user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  },
                  "product_tax_code": null,
                  "published_reviews_count": 0,
                  "route": "ceramic-coating-package",
                  "title": "Ceramic Coating Package",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "verified": false,
                  "visibility": "visible"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "product.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Product"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "product.updated",
                    "description": "The webhook event type",
                    "example": "product.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Product Updated",
        "tags": [
          "Products"
        ]
      }
    },
    "refund.created": {
      "post": {
        "description": "Sent when a refund is created\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:refunds`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount": 50,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "id": "rf_xxxxxxxxxxxxxx",
                  "payment": {
                    "billing_reason": null,
                    "card_brand": null,
                    "card_last4": null,
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "dispute_alerted_at": null,
                    "id": "pay_xxxxxxxxxxxxxx",
                    "member": null,
                    "membership": {
                      "id": "mem_xxxxxxxxxxxxxx",
                      "status": "active"
                    },
                    "metadata": {},
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "payment_method_type": null,
                    "plan": {
                      "id": "plan_xxxxxxxxxxxxxx",
                      "metadata": {}
                    },
                    "product": {
                      "id": "prod_xxxxxxxxxxxxxx",
                      "metadata": {}
                    },
                    "subtotal": null,
                    "tax_amount": null,
                    "tax_behavior": null,
                    "tax_refunded_amount": 0,
                    "total": null,
                    "usd_total": null,
                    "user": {
                      "email": "marcus@shinetime.example",
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "provider": "stripe",
                  "provider_created_at": "2026-01-01T12:00:00.000Z",
                  "reference_status": null,
                  "reference_type": null,
                  "reference_value": null,
                  "status": "succeeded"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "refund.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Refund"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "refund.created",
                    "description": "The webhook event type",
                    "example": "refund.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Refund Created",
        "tags": [
          "Refunds"
        ]
      }
    },
    "refund.updated": {
      "post": {
        "description": "Sent when a refund is updated\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:refunds`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "amount": 50,
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "currency": "usd",
                  "id": "rf_xxxxxxxxxxxxxx",
                  "payment": {
                    "billing_reason": null,
                    "card_brand": null,
                    "card_last4": null,
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "dispute_alerted_at": null,
                    "id": "pay_xxxxxxxxxxxxxx",
                    "member": null,
                    "membership": {
                      "id": "mem_xxxxxxxxxxxxxx",
                      "status": "active"
                    },
                    "metadata": {},
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "payment_method_type": null,
                    "plan": {
                      "id": "plan_xxxxxxxxxxxxxx",
                      "metadata": {}
                    },
                    "product": {
                      "id": "prod_xxxxxxxxxxxxxx",
                      "metadata": {}
                    },
                    "subtotal": null,
                    "tax_amount": null,
                    "tax_behavior": null,
                    "tax_refunded_amount": 0,
                    "total": null,
                    "usd_total": null,
                    "user": {
                      "email": "marcus@shinetime.example",
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "provider": "stripe",
                  "provider_created_at": "2026-01-01T12:00:00.000Z",
                  "reference_status": "available",
                  "reference_type": "acquirer_reference_number",
                  "reference_value": "74850120752",
                  "status": "succeeded"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "refund.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Refund"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "refund.updated",
                    "description": "The webhook event type",
                    "example": "refund.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Refund Updated",
        "tags": [
          "Refunds"
        ]
      }
    },
    "resolution_center_case.created": {
      "post": {
        "description": "Sent when a resolution center case is created\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "customer_appealed": false,
                  "customer_response_actions": [
                    "withdraw"
                  ],
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "id": "reso_xxxxxxxxxxxxxx",
                  "issue": "item_not_received",
                  "member": null,
                  "merchant_appealed": false,
                  "merchant_response_actions": [
                    "accept",
                    "deny",
                    "request_more_info"
                  ],
                  "payment": {
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "id": "pay_xxxxxxxxxxxxxx",
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "subtotal": null,
                    "total": 0
                  },
                  "platform_response_actions": [],
                  "resolution_events": [],
                  "status": "merchant_response_needed",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "resolution_center_case.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.created",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Created",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "resolution_center_case.decided": {
      "post": {
        "description": "Sent when a resolution center case is decided\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "customer_appealed": false,
                  "customer_response_actions": [],
                  "due_date": null,
                  "id": "reso_xxxxxxxxxxxxxx",
                  "issue": "item_not_received",
                  "member": null,
                  "merchant_appealed": false,
                  "merchant_response_actions": [],
                  "payment": {
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "id": "pay_xxxxxxxxxxxxxx",
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "subtotal": null,
                    "total": 0
                  },
                  "platform_response_actions": [],
                  "resolution_events": [],
                  "status": "customer_won",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "resolution_center_case.decided"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.decided",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.decided",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Decided",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "resolution_center_case.updated": {
      "post": {
        "description": "Sent when a resolution center case is updated\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx",
                    "title": "Shine Time Auto Detailing"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "customer_appealed": false,
                  "customer_response_actions": [
                    "respond",
                    "withdraw"
                  ],
                  "due_date": "2026-01-01T12:00:00.000Z",
                  "id": "reso_xxxxxxxxxxxxxx",
                  "issue": "item_not_received",
                  "member": null,
                  "merchant_appealed": false,
                  "merchant_response_actions": [],
                  "payment": {
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "currency": "usd",
                    "id": "pay_xxxxxxxxxxxxxx",
                    "paid_at": "2026-01-01T12:00:00.000Z",
                    "subtotal": null,
                    "total": 0
                  },
                  "platform_response_actions": [],
                  "resolution_events": [],
                  "status": "customer_response_needed",
                  "updated_at": "2026-01-01T12:00:00.000Z",
                  "user": {
                    "id": "user_xxxxxxxxxxxxxx",
                    "name": "Marcus Webb",
                    "username": "marcuswebb"
                  }
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "resolution_center_case.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.updated",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Updated",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "setup_intent.canceled": {
      "post": {
        "description": "Sent when a setup intent is canceled\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "checkout_configuration": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "error_message": "Your card was declined.",
                  "id": "sint_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "user": {
                      "email": "marcus@shinetime.example",
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "metadata": null,
                  "payment_method": null,
                  "status": "canceled",
                  "three_ds_verified": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "setup_intent.canceled"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.canceled",
                    "description": "The webhook event type",
                    "example": "setup_intent.canceled",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Canceled",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "setup_intent.requires_action": {
      "post": {
        "description": "Sent when a setup intent is requires action\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "checkout_configuration": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "error_message": null,
                  "id": "sint_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "user": {
                      "email": "marcus@shinetime.example",
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "metadata": null,
                  "payment_method": null,
                  "status": "requires_action",
                  "three_ds_verified": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "setup_intent.requires_action"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.requires_action",
                    "description": "The webhook event type",
                    "example": "setup_intent.requires_action",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Requires action",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "setup_intent.succeeded": {
      "post": {
        "description": "Sent when a setup intent is succeeded\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "checkout_configuration": null,
                  "company": {
                    "id": "biz_xxxxxxxxxxxxxx"
                  },
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "error_message": null,
                  "id": "sint_xxxxxxxxxxxxxx",
                  "member": {
                    "id": "mber_xxxxxxxxxxxxxx",
                    "user": {
                      "email": "marcus@shinetime.example",
                      "id": "user_xxxxxxxxxxxxxx",
                      "name": "Marcus Webb",
                      "username": "marcuswebb"
                    }
                  },
                  "metadata": null,
                  "payment_method": {
                    "card": {
                      "brand": null,
                      "exp_month": 11,
                      "exp_year": 2030,
                      "last4": "4242"
                    },
                    "created_at": "2026-01-01T12:00:00.000Z",
                    "id": "payt_xxxxxxxxxxxxxx",
                    "mailing_address": null,
                    "payment_method_type": "card"
                  },
                  "status": "succeeded",
                  "three_ds_verified": false
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "setup_intent.succeeded"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.succeeded",
                    "description": "The webhook event type",
                    "example": "setup_intent.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Succeeded",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "shipment.created": {
      "post": {
        "description": "Sent when a shipment is created\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`\n - `webhook_receive:shipments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "delivery_estimate": null,
                  "id": "ship_xxxxxxxxxxxxxx",
                  "payment": {
                    "id": "pay_xxxxxxxxxxxxxx"
                  },
                  "service": "UPS Ground",
                  "status": "pre_transit",
                  "substatus": "label_created",
                  "tracking_code": "1Z999AA10123456784",
                  "updated_at": "2026-01-01T12:00:00.000Z"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "shipment.created"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Shipment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "shipment.created",
                    "description": "The webhook event type",
                    "example": "shipment.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Shipment Created",
        "tags": [
          "Shipments"
        ]
      }
    },
    "shipment.updated": {
      "post": {
        "description": "Sent when a shipment is updated\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`\n - `webhook_receive:shipments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "created_at": "2026-01-01T12:00:00.000Z",
                  "delivery_estimate": "2026-01-01T12:00:00.000Z",
                  "id": "ship_xxxxxxxxxxxxxx",
                  "payment": {
                    "id": "pay_xxxxxxxxxxxxxx"
                  },
                  "service": "UPS Ground",
                  "status": "delivered",
                  "substatus": "status_update",
                  "tracking_code": "1Z999AA10123456784",
                  "updated_at": "2026-01-01T12:00:00.000Z"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "shipment.updated"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Shipment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "shipment.updated",
                    "description": "The webhook event type",
                    "example": "shipment.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Shipment Updated",
        "tags": [
          "Shipments"
        ]
      }
    },
    "verification.succeeded": {
      "post": {
        "description": "Sent when a verification is succeeded\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:verifications`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_version": "v1",
                "api_version_date": null,
                "company_id": "biz_xxxxxxxxxxxxxx",
                "data": {
                  "id": "verf_xxxxxxxxxxxxxx",
                  "last_error_code": null,
                  "last_error_reason": null,
                  "status": "verified"
                },
                "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                "timestamp": "2025-01-01T00:00:00.000Z",
                "type": "verification.succeeded"
              },
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "api_version_date": {
                    "description": "The dated API version (Api-Version-Date) the payload is serialized to",
                    "example": "2026-07-20",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The account ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Verification"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "previous_attributes": {
                    "description": "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
                    "type": "object"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "verification.succeeded",
                    "description": "The webhook event type",
                    "example": "verification.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "api_version_date",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Verification Succeeded",
        "tags": [
          "Verifications"
        ]
      }
    }
  }
}
