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.
Parameters
- componentsobjectRequired
Configuration for each component. At least 1 component must be enabled.
- customerstringRequired
The ID of an existing customer for which to create the Customer Session.
Returns
Returns a Customer Session object.
Response
{ "object": "customer_session", "client_secret": "_POpxYpmkXdtttYtZQYhrsOJZ2RCQ9kCqqXRU6qrP5c4Jgje", "components": { "buy_button": { "enabled": false }, "pricing_table": { "enabled": true } }, "customer": "cus_PO34b57IOUb83c", "expires_at": 1684790027, "livemode": false}- Need help? Contact Support.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
- Powered by Markdoc