diff --git a/embedded/openapi/fixtures3.beta.json b/embedded/openapi/fixtures3.beta.json index 667bf1ec..b53d56a3 100755 --- a/embedded/openapi/fixtures3.beta.json +++ b/embedded/openapi/fixtures3.beta.json @@ -811,6 +811,7 @@ } }, "return_url": "https://example.com/return", + "setup_future_usage": "off_session", "setup_intent": null, "shipping": { "address": { @@ -1262,6 +1263,7 @@ }, "customer_session": { "client_secret": "_PB0fJ3hjtNwv8q9uBE2WCHja97ziIdXj38YAVkF7DYVuqqj", + "components": {}, "created": 1234567890, "customer": "cus_PB04OtV7Mglte4", "expires_at": 1234567890, @@ -1560,39 +1562,6 @@ "metadata": {}, "object": "file_link", "url": "https://rwashburne-g8ezbf--upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT01lM3JDTERMcEhtRTZ1fGZsX3Rlc3RfU1BWbWdMcFVLVTFIUHZpM0lpTFFDRmtm00yC4jtB6H" - }, - { - "created": 1704317635, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUc4VCvqdCcBJstSiPWoOrm", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfUXJQZjBMNVhVT2l1NWFoSDE2V2tJN0dZ00maU6RA8s" - }, - { - "created": 1704317268, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUbyaCvqdCcBJst24owQXtB", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfOTNlSU0wd0gwdE9MNERNY2VxaDZ1RGNU00rA23eftk" - }, - { - "created": 1704317267, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUbyZCvqdCcBJstiMH2ccV7", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfMzlSSjB3QTE2bDc1djNhVkdTWjRSdE1P00wpLiNEEN" } ], "has_more": false, diff --git a/embedded/openapi/fixtures3.json b/embedded/openapi/fixtures3.json index e55e572c..d3be0cab 100644 --- a/embedded/openapi/fixtures3.json +++ b/embedded/openapi/fixtures3.json @@ -1130,6 +1130,15 @@ "object": "customer_cash_balance_transaction", "type": "funded" }, + "customer_session": { + "client_secret": "_PMG9cUABRpWoToRKwjVQsfVNtZ0oe5m5LuRYsgOe68eoLHh", + "components": {}, + "created": 1234567890, + "customer": "cus_PMG9sZduVeoHej", + "expires_at": 1234567890, + "livemode": false, + "object": "customer_session" + }, "deleted_account": { "deleted": true, "id": "acct_1OPouMJN5vQBdWEx", @@ -1425,48 +1434,15 @@ "links": { "data": [ { - "created": 1704317636, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUc4WCvqdCcBJstqK9xR0jd", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfT1I4MWJUZUpJRGhra2pocFliQVMzUFBN00yC1khHda" - }, - { - "created": 1704317635, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUc4VCvqdCcBJstSiPWoOrm", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfUXJQZjBMNVhVT2l1NWFoSDE2V2tJN0dZ00maU6RA8s" - }, - { - "created": 1704317268, - "expired": false, - "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUbyaCvqdCcBJst24owQXtB", - "livemode": false, - "metadata": {}, - "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfOTNlSU0wd0gwdE9MNERNY2VxaDZ1RGNU00rA23eftk" - }, - { - "created": 1704317267, + "created": 1705015539, "expired": false, "expires_at": null, - "file": "file_1OUbyZCvqdCcBJstQnA2CM0M", - "id": "link_1OUbyZCvqdCcBJstiMH2ccV7", + "file": "file_1OXXd1D2qP7QtJeGUtVg07y2", + "id": "link_1OXXd1D2qP7QtJeG4PxdkQAI", "livemode": false, "metadata": {}, "object": "file_link", - "url": "https://anniel-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1VieHdDdnFkQ2NCSnN0fGZsX3Rlc3RfMzlSSjB3QTE2bDc1djNhVkdTWjRSdE1P00wpLiNEEN" + "url": "https://pakrym-upload-mydev.dev.stripe.me/links/MDB8YWNjdF8xT1hYY1VEMnFQN1F0SmVHfGZsX3Rlc3RfUzNDbHVhMWc0dEJuaWZVTFlQbXVSelhu00rmgafjqm" } ], "has_more": false, diff --git a/embedded/openapi/spec3.beta.sdk.json b/embedded/openapi/spec3.beta.sdk.json index e5df5bb9..6fd31341 100644 --- a/embedded/openapi/spec3.beta.sdk.json +++ b/embedded/openapi/spec3.beta.sdk.json @@ -12357,6 +12357,9 @@ "customer_session_resource_components": { "description": "Configuration for the components supported by this customer session.", "properties": { + "buy_button": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_buy_button" + }, "payment_element": { "$ref": "#/components/schemas/customer_session_resource_components_resource_payment_element" }, @@ -12367,10 +12370,26 @@ "title": "CustomerSessionResourceComponents", "type": "object", "x-expandableFields": [ + "buy_button", "payment_element", "pricing_table" ] }, + "customer_session_resource_components_resource_buy_button": { + "description": "This hash contains whether the buy button is enabled.", + "properties": { + "enabled": { + "description": "Whether the buy button is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "CustomerSessionResourceComponentsResourceBuyButton", + "type": "object", + "x-expandableFields": [] + }, "customer_session_resource_components_resource_payment_element": { "description": "This hash contains whether the payment element is enabled and the features it supports.", "properties": { @@ -87281,6 +87300,20 @@ "components": { "description": "Configuration for each component. 1 component must be enabled.", "properties": { + "buy_button": { + "description": "Configuration for buy button.", + "properties": { + "enabled": { + "description": "Whether the buy button is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "buy_button_param", + "type": "object" + }, "payment_element": { "description": "Configuration for the payment element.", "properties": { diff --git a/embedded/openapi/spec3.json b/embedded/openapi/spec3.json index 8d676692..39dd6fad 100644 --- a/embedded/openapi/spec3.json +++ b/embedded/openapi/spec3.json @@ -8077,6 +8077,121 @@ ], "x-resourceId": "customer_cash_balance_transaction" }, + "customer_session": { + "description": "A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)\ncontrol over a customer.", + "properties": { + "client_secret": { + "description": "The client secret of this customer session. Used on the client to set up secure access to the given `customer`.\n\nThe client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "maxLength": 5000, + "type": "string" + }, + "components": { + "$ref": "#/components/schemas/customer_session_resource_components" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "customer": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer" + } + ], + "description": "The customer the customer session was created for.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer" + } + ] + } + }, + "expires_at": { + "description": "The timestamp at which this customer session 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": [ + "customer_session" + ], + "type": "string" + } + }, + "required": [ + "client_secret", + "created", + "customer", + "expires_at", + "livemode", + "object" + ], + "title": "CustomerSessionResourceCustomerSession", + "type": "object", + "x-expandableFields": [ + "components", + "customer" + ], + "x-resourceId": "customer_session" + }, + "customer_session_resource_components": { + "description": "Configuration for the components supported by this customer session.", + "properties": { + "buy_button": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_buy_button" + }, + "pricing_table": { + "$ref": "#/components/schemas/customer_session_resource_components_resource_pricing_table" + } + }, + "title": "CustomerSessionResourceComponents", + "type": "object", + "x-expandableFields": [ + "buy_button", + "pricing_table" + ] + }, + "customer_session_resource_components_resource_buy_button": { + "description": "This hash contains whether the buy button is enabled.", + "properties": { + "enabled": { + "description": "Whether the buy button is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "CustomerSessionResourceComponentsResourceBuyButton", + "type": "object", + "x-expandableFields": [] + }, + "customer_session_resource_components_resource_pricing_table": { + "description": "This hash contains whether the pricing table is enabled.", + "properties": { + "enabled": { + "description": "Whether the pricing table is enabled.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "CustomerSessionResourceComponentsResourcePricingTable", + "type": "object", + "x-expandableFields": [] + }, "customer_tax": { "description": "", "properties": { @@ -65288,6 +65403,105 @@ } } }, + "/v1/customer_sessions": { + "post": { + "description": "
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
", + "operationId": "PostCustomerSessions", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "components": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "components": { + "description": "Configuration for each component. 1 component must be enabled.", + "properties": { + "buy_button": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "buy_button_param", + "type": "object" + }, + "pricing_table": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "pricing_table_param", + "type": "object" + } + }, + "title": "components", + "type": "object" + }, + "customer": { + "description": "The ID of an existing customer for which to create the customer session.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "components", + "customer" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer_session" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, "/v1/customers": { "get": { "description": "Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
",