POST /v1/customer_sessions

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.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
customer String Yes

The ID of an existing customer for which to create the Customer Session.

expand[] Array No

Specifies which fields in the response should be expanded.

components Object Yes

Configuration for each component. Exactly 1 component must be enabled.

components.buy_button Object No
components.buy_button.enabled Boolean Yes
components.pricing_table Object No
components.pricing_table.enabled Boolean Yes
components.payment_element Object No
components.payment_element.enabled Boolean Yes
components.payment_element.features Object No
components.payment_element.features.payment_method_redisplay String No

Possible values:

  • "disabled"
  • "enabled"
components.payment_element.features.payment_method_save_usage String No

Possible values:

  • "off_session"
  • "on_session"
components.payment_element.features.payment_method_save String No

Possible values:

  • "disabled"
  • "enabled"
components.payment_element.features.payment_method_redisplay_limit Integer No
components.payment_element.features.payment_method_allow_redisplay_filters[] Array No
components.payment_element.features.payment_method_remove String No

Possible values:

  • "disabled"
  • "enabled"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.