diff --git a/openapi/spec3.beta.sdk.json b/openapi/spec3.beta.sdk.json index 7ac952a6..8804db8a 100644 --- a/openapi/spec3.beta.sdk.json +++ b/openapi/spec3.beta.sdk.json @@ -1523,6 +1523,9 @@ "maxLength": 5000, "type": "string" }, + "components": { + "$ref": "#/components/schemas/connect_embedded_account_session_create_components" + }, "expires_at": { "description": "The timestamp at which this AccountSession will expire.", "format": "unix-time", @@ -1543,13 +1546,16 @@ "required": [ "account", "client_secret", + "components", "expires_at", "livemode", "object" ], "title": "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession", "type": "object", - "x-expandableFields": [], + "x-expandableFields": [ + "components" + ], "x-resourceId": "account_session", "x-stripeOperations": [ { @@ -7409,6 +7415,126 @@ ] } }, + "connect_embedded_account_session_create_components": { + "description": "", + "properties": { + "account_onboarding": { + "$ref": "#/components/schemas/connect_embedded_base_config" + }, + "payment_details": { + "$ref": "#/components/schemas/connect_embedded_payments_config" + }, + "payments": { + "$ref": "#/components/schemas/connect_embedded_payments_config" + }, + "payouts": { + "$ref": "#/components/schemas/connect_embedded_base_config" + } + }, + "required": [ + "account_onboarding" + ], + "title": "ConnectEmbeddedAccountSessionCreateComponents", + "type": "object", + "x-expandableFields": [ + "account_onboarding", + "payment_details", + "payments", + "payouts" + ], + "x-stripeResource": { + "class_name": "Components", + "in_package": "" + } + }, + "connect_embedded_base_config": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_base_features" + } + }, + "required": [ + "enabled" + ], + "title": "ConnectEmbeddedBaseConfig", + "type": "object", + "x-expandableFields": [ + "features" + ], + "x-stripeResource": { + "class_name": "BaseConfig", + "in_package": "" + } + }, + "connect_embedded_base_features": { + "description": "", + "properties": {}, + "title": "ConnectEmbeddedBaseFeatures", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "BaseFeatures", + "in_package": "" + } + }, + "connect_embedded_payments_config": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + }, + "features": { + "$ref": "#/components/schemas/connect_embedded_payments_features" + } + }, + "required": [ + "enabled" + ], + "title": "ConnectEmbeddedPaymentsConfig", + "type": "object", + "x-expandableFields": [ + "features" + ], + "x-stripeResource": { + "class_name": "PaymentsConfig", + "in_package": "" + } + }, + "connect_embedded_payments_features": { + "description": "", + "properties": { + "capture_payments": { + "description": "Whether to allow capturing and cancelling payment intents. This is `true` by default.", + "type": "boolean" + }, + "dispute_management": { + "description": "Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.", + "type": "boolean" + }, + "refund_management": { + "description": "Whether to allow sending refunds. This is `true` by default.", + "type": "boolean" + } + }, + "required": [ + "capture_payments", + "dispute_management", + "refund_management" + ], + "title": "ConnectEmbeddedPaymentsFeatures", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "PaymentsFeatures", + "in_package": "" + } + }, "country_spec": { "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", "properties": { @@ -60328,6 +60454,10 @@ "content": { "application/x-www-form-urlencoded": { "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, "expand": { "explode": true, "style": "deepObject" @@ -60340,6 +60470,69 @@ "description": "The identifier of the account to create an Account Session for.", "type": "string" }, + "components": { + "description": "Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not, its corresponding features, etc.).", + "properties": { + "account_onboarding": { + "description": "Configuration for the account onboarding embedded component.", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "base_config_param", + "type": "object" + }, + "payment_details": { + "description": "Configuration for the payment details embedded component.", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payments_config_param", + "type": "object" + }, + "payments": { + "description": "Configuration for the payments embedded component.", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "payments_config_param", + "type": "object" + }, + "payouts": { + "description": "Configuration for the payouts embedded component.", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "base_config_param", + "type": "object" + } + }, + "title": "account_session_create_components_param", + "type": "object" + }, "expand": { "description": "Specifies which fields in the response should be expanded.", "items": { @@ -60350,7 +60543,8 @@ } }, "required": [ - "account" + "account", + "components" ], "type": "object" } diff --git a/openapi/spec3.beta.sdk.yaml b/openapi/spec3.beta.sdk.yaml index 44ee8c0b..c3ac7253 100644 --- a/openapi/spec3.beta.sdk.yaml +++ b/openapi/spec3.beta.sdk.yaml @@ -1544,6 +1544,9 @@ components: and learn about how `client_secret` should be handled. maxLength: 5000 type: string + components: + $ref: >- + #/components/schemas/connect_embedded_account_session_create_components expires_at: description: The timestamp at which this AccountSession will expire. format: unix-time @@ -1563,12 +1566,14 @@ components: required: - account - client_secret + - components - expires_at - livemode - object title: ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession type: object - x-expandableFields: [] + x-expandableFields: + - components x-resourceId: account_session x-stripeOperations: - method_name: create @@ -7294,6 +7299,98 @@ components: in_package: '' polymorphic_groups: - balance_transaction_source + connect_embedded_account_session_create_components: + description: '' + properties: + account_onboarding: + $ref: '#/components/schemas/connect_embedded_base_config' + payment_details: + $ref: '#/components/schemas/connect_embedded_payments_config' + payments: + $ref: '#/components/schemas/connect_embedded_payments_config' + payouts: + $ref: '#/components/schemas/connect_embedded_base_config' + required: + - account_onboarding + title: ConnectEmbeddedAccountSessionCreateComponents + type: object + x-expandableFields: + - account_onboarding + - payment_details + - payments + - payouts + x-stripeResource: + class_name: Components + in_package: '' + connect_embedded_base_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + features: + $ref: '#/components/schemas/connect_embedded_base_features' + required: + - enabled + title: ConnectEmbeddedBaseConfig + type: object + x-expandableFields: + - features + x-stripeResource: + class_name: BaseConfig + in_package: '' + connect_embedded_base_features: + description: '' + properties: {} + title: ConnectEmbeddedBaseFeatures + type: object + x-expandableFields: [] + x-stripeResource: + class_name: BaseFeatures + in_package: '' + connect_embedded_payments_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + features: + $ref: '#/components/schemas/connect_embedded_payments_features' + required: + - enabled + title: ConnectEmbeddedPaymentsConfig + type: object + x-expandableFields: + - features + x-stripeResource: + class_name: PaymentsConfig + in_package: '' + connect_embedded_payments_features: + description: '' + properties: + capture_payments: + description: >- + Whether to allow capturing and cancelling payment intents. This is + `true` by default. + type: boolean + dispute_management: + description: >- + Whether to allow responding to disputes, including submitting + evidence and accepting disputes. This is `true` by default. + type: boolean + refund_management: + description: Whether to allow sending refunds. This is `true` by default. + type: boolean + required: + - capture_payments + - dispute_management + - refund_management + title: ConnectEmbeddedPaymentsFeatures + type: object + x-expandableFields: [] + x-stripeResource: + class_name: PaymentsFeatures + in_package: '' country_spec: description: >- Stripe needs to collect certain pieces of information about each account @@ -54676,6 +54773,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + components: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -54687,6 +54787,59 @@ paths: The identifier of the account to create an Account Session for. type: string + components: + description: >- + Each key of the dictionary represents an embedded component, + and each embedded component maps to its configuration (e.g. + whether it has been enabled or not, its corresponding + features, etc.). + properties: + account_onboarding: + description: >- + Configuration for the account onboarding embedded + component. + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: base_config_param + type: object + payment_details: + description: >- + Configuration for the payment details embedded + component. + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: payments_config_param + type: object + payments: + description: Configuration for the payments embedded component. + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: payments_config_param + type: object + payouts: + description: Configuration for the payouts embedded component. + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: base_config_param + type: object + title: account_session_create_components_param + type: object expand: description: Specifies which fields in the response should be expanded. items: @@ -54695,6 +54848,7 @@ paths: type: array required: - account + - components type: object required: true responses: diff --git a/openapi/spec3.json b/openapi/spec3.json index 61fd4133..0e7c760a 100644 --- a/openapi/spec3.json +++ b/openapi/spec3.json @@ -1293,6 +1293,54 @@ "type": "object", "x-expandableFields": [] }, + "account_session": { + "description": "An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.\n\nWe recommend that you create an AccountSession each time you need to display an embedded component\nto your user. Do not save AccountSessions to your database as they expire relatively\nquickly, and cannot be used more than once.\n\nRelated guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)", + "properties": { + "account": { + "description": "The ID of the account the AccountSession was created for", + "maxLength": 5000, + "type": "string" + }, + "client_secret": { + "description": "The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.\n\nThe client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": "string" + }, + "components": { + "$ref": "#/components/schemas/connect_embedded_account_session_create_components" + }, + "expires_at": { + "description": "The timestamp at which this AccountSession will expire.", + "format": "unix-time", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account_session" + ], + "type": "string" + } + }, + "required": [ + "account", + "client_secret", + "components", + "expires_at", + "livemode", + "object" + ], + "title": "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession", + "type": "object", + "x-expandableFields": [ + "components" + ], + "x-resourceId": "account_session" + }, "account_settings": { "description": "", "properties": { @@ -5357,6 +5405,37 @@ "destination" ] }, + "connect_embedded_account_session_create_components": { + "description": "", + "properties": { + "account_onboarding": { + "$ref": "#/components/schemas/connect_embedded_base_config" + } + }, + "required": [ + "account_onboarding" + ], + "title": "ConnectEmbeddedAccountSessionCreateComponents", + "type": "object", + "x-expandableFields": [ + "account_onboarding" + ] + }, + "connect_embedded_base_config": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "ConnectEmbeddedBaseConfig", + "type": "object", + "x-expandableFields": [] + }, "country_spec": { "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", "properties": { @@ -42618,6 +42697,92 @@ } } }, + "/v1/account_sessions": { + "post": { + "description": "

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

", + "operationId": "PostAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an Account Session for.", + "type": "string" + }, + "components": { + "description": "Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).", + "properties": { + "account_onboarding": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "base_config_param", + "type": "object" + } + }, + "title": "account_session_create_components_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "account", + "components" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, "/v1/accounts": { "get": { "description": "

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

", diff --git a/openapi/spec3.sdk.json b/openapi/spec3.sdk.json index 25b8f636..3e99691b 100644 --- a/openapi/spec3.sdk.json +++ b/openapi/spec3.sdk.json @@ -1501,6 +1501,67 @@ "in_package": "" } }, + "account_session": { + "description": "An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.\n\nWe recommend that you create an AccountSession each time you need to display an embedded component\nto your user. Do not save AccountSessions to your database as they expire relatively\nquickly, and cannot be used more than once.\n\nRelated guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)", + "properties": { + "account": { + "description": "The ID of the account the AccountSession was created for", + "maxLength": 5000, + "type": "string" + }, + "client_secret": { + "description": "The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.\n\nThe client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.", + "maxLength": 5000, + "type": "string" + }, + "components": { + "$ref": "#/components/schemas/connect_embedded_account_session_create_components" + }, + "expires_at": { + "description": "The timestamp at which this AccountSession will expire.", + "format": "unix-time", + "type": "integer" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "account_session" + ], + "type": "string" + } + }, + "required": [ + "account", + "client_secret", + "components", + "expires_at", + "livemode", + "object" + ], + "title": "ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession", + "type": "object", + "x-expandableFields": [ + "components" + ], + "x-resourceId": "account_session", + "x-stripeOperations": [ + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/account_sessions" + } + ], + "x-stripeResource": { + "class_name": "AccountSession", + "in_package": "" + } + }, "account_settings": { "description": "", "properties": { @@ -6500,6 +6561,45 @@ ] } }, + "connect_embedded_account_session_create_components": { + "description": "", + "properties": { + "account_onboarding": { + "$ref": "#/components/schemas/connect_embedded_base_config" + } + }, + "required": [ + "account_onboarding" + ], + "title": "ConnectEmbeddedAccountSessionCreateComponents", + "type": "object", + "x-expandableFields": [ + "account_onboarding" + ], + "x-stripeResource": { + "class_name": "Components", + "in_package": "" + } + }, + "connect_embedded_base_config": { + "description": "", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "ConnectEmbeddedBaseConfig", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "BaseConfig", + "in_package": "" + } + }, "country_spec": { "description": "Stripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.\n\nYou can also view the information from this API call as [an online\nguide](/docs/connect/required-verification-information).", "properties": { @@ -51604,6 +51704,94 @@ } } }, + "/v1/account_sessions": { + "post": { + "description": "

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

", + "operationId": "PostAccountSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "account": { + "description": "The identifier of the account to create an Account Session for.", + "type": "string" + }, + "components": { + "description": "Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).", + "properties": { + "account_onboarding": { + "description": "Configuration for the account onboarding embedded component.", + "properties": { + "enabled": { + "description": "Whether the embedded component is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "base_config_param", + "type": "object" + } + }, + "title": "account_session_create_components_param", + "type": "object" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "account", + "components" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, "/v1/accounts": { "get": { "description": "

Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.

", diff --git a/openapi/spec3.sdk.yaml b/openapi/spec3.sdk.yaml index d99068fa..952a40b5 100644 --- a/openapi/spec3.sdk.yaml +++ b/openapi/spec3.sdk.yaml @@ -1496,6 +1496,85 @@ components: x-stripeResource: class_name: SepaDebitPayments in_package: '' + account_session: + description: >- + An AccountSession allows a Connect platform to grant access to a + connected account in Connect embedded components. + + + We recommend that you create an AccountSession each time you need to + display an embedded component + + to your user. Do not save AccountSessions to your database as they + expire relatively + + quickly, and cannot be used more than once. + + + Related guide: [Connect embedded + components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + properties: + account: + description: The ID of the account the AccountSession was created for + maxLength: 5000 + type: string + client_secret: + description: >- + The client secret of this AccountSession. Used on the client to set + up secure access to the given `account`. + + + The client secret can be used to provide access to `account` from + your frontend. It should not be stored, logged, or exposed to anyone + other than the connected account. Make sure that you have TLS + enabled on any page that includes the client secret. + + + Refer to our docs to [setup Connect embedded + components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + and learn about how `client_secret` should be handled. + maxLength: 5000 + type: string + components: + $ref: >- + #/components/schemas/connect_embedded_account_session_create_components + expires_at: + description: The timestamp at which this AccountSession will expire. + format: unix-time + type: integer + livemode: + description: >- + Has the value `true` if the object exists in live mode or the value + `false` if the object exists in test mode. + type: boolean + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - account_session + type: string + required: + - account + - client_secret + - components + - expires_at + - livemode + - object + title: ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession + type: object + x-expandableFields: + - components + x-resourceId: account_session + x-stripeOperations: + - method_name: create + method_on: service + method_type: create + operation: post + path: /v1/account_sessions + x-stripeResource: + class_name: AccountSession + in_package: '' account_settings: description: '' properties: @@ -6424,6 +6503,34 @@ components: in_package: '' polymorphic_groups: - balance_transaction_source + connect_embedded_account_session_create_components: + description: '' + properties: + account_onboarding: + $ref: '#/components/schemas/connect_embedded_base_config' + required: + - account_onboarding + title: ConnectEmbeddedAccountSessionCreateComponents + type: object + x-expandableFields: + - account_onboarding + x-stripeResource: + class_name: Components + in_package: '' + connect_embedded_base_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: ConnectEmbeddedBaseConfig + type: object + x-expandableFields: [] + x-stripeResource: + class_name: BaseConfig + in_package: '' country_spec: description: >- Stripe needs to collect certain pieces of information about each account @@ -47033,6 +47140,75 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + /v1/account_sessions: + post: + description: >- +

Creates a AccountSession object that includes a single-use token that + the platform can use on their front-end to grant client-side API + access.

+ operationId: PostAccountSessions + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + components: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + account: + description: >- + The identifier of the account to create an Account Session + for. + type: string + components: + description: >- + Each key of the dictionary represents an embedded component, + and each embedded component maps to its configuration (e.g. + whether it has been enabled or not). + properties: + account_onboarding: + description: >- + Configuration for the account onboarding embedded + component. + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: base_config_param + type: object + title: account_session_create_components_param + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + required: + - account + - components + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/account_session' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. /v1/accounts: get: description: >- diff --git a/openapi/spec3.yaml b/openapi/spec3.yaml index 0e375320..f09f47b7 100644 --- a/openapi/spec3.yaml +++ b/openapi/spec3.yaml @@ -1333,6 +1333,76 @@ components: title: AccountSepaDebitPaymentsSettings type: object x-expandableFields: [] + account_session: + description: >- + An AccountSession allows a Connect platform to grant access to a + connected account in Connect embedded components. + + + We recommend that you create an AccountSession each time you need to + display an embedded component + + to your user. Do not save AccountSessions to your database as they + expire relatively + + quickly, and cannot be used more than once. + + + Related guide: [Connect embedded + components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + properties: + account: + description: The ID of the account the AccountSession was created for + maxLength: 5000 + type: string + client_secret: + description: >- + The client secret of this AccountSession. Used on the client to set + up secure access to the given `account`. + + + The client secret can be used to provide access to `account` from + your frontend. It should not be stored, logged, or exposed to anyone + other than the connected account. Make sure that you have TLS + enabled on any page that includes the client secret. + + + Refer to our docs to [setup Connect embedded + components](https://stripe.com/docs/connect/get-started-connect-embedded-components) + and learn about how `client_secret` should be handled. + maxLength: 5000 + type: string + components: + $ref: >- + #/components/schemas/connect_embedded_account_session_create_components + expires_at: + description: The timestamp at which this AccountSession will expire. + format: unix-time + type: integer + livemode: + description: >- + Has the value `true` if the object exists in live mode or the value + `false` if the object exists in test mode. + type: boolean + object: + description: >- + String representing the object's type. Objects of the same type + share the same value. + enum: + - account_session + type: string + required: + - account + - client_secret + - components + - expires_at + - livemode + - object + title: ConnectEmbeddedMethodAccountSessionCreateMethodAccountSession + type: object + x-expandableFields: + - components + x-resourceId: account_session account_settings: description: '' properties: @@ -5483,6 +5553,28 @@ components: type: object x-expandableFields: - destination + connect_embedded_account_session_create_components: + description: '' + properties: + account_onboarding: + $ref: '#/components/schemas/connect_embedded_base_config' + required: + - account_onboarding + title: ConnectEmbeddedAccountSessionCreateComponents + type: object + x-expandableFields: + - account_onboarding + connect_embedded_base_config: + description: '' + properties: + enabled: + description: Whether the embedded component is enabled. + type: boolean + required: + - enabled + title: ConnectEmbeddedBaseConfig + type: object + x-expandableFields: [] country_spec: description: >- Stripe needs to collect certain pieces of information about each account @@ -39888,6 +39980,71 @@ paths: schema: $ref: '#/components/schemas/error' description: Error response. + /v1/account_sessions: + post: + description: >- +

Creates a AccountSession object that includes a single-use token that + the platform can use on their front-end to grant client-side API + access.

+ operationId: PostAccountSessions + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + components: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + account: + description: >- + The identifier of the account to create an Account Session + for. + type: string + components: + description: >- + Each key of the dictionary represents an embedded component, + and each embedded component maps to its configuration (e.g. + whether it has been enabled or not). + properties: + account_onboarding: + properties: + enabled: + type: boolean + required: + - enabled + title: base_config_param + type: object + title: account_session_create_components_param + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + required: + - account + - components + type: object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/account_session' + description: Successful response. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/error' + description: Error response. /v1/accounts: get: description: >-