POST /v1/checkout/sessions/{session}

Updates a Checkout Session object.

Related guide: Dynamically update a Checkout Session

Servers

Path parameters

Name Type Required Description
session String Yes

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
collected_information Object No

Information about the customer collected within the Checkout Session. Can only be set when updating embedded or custom sessions.

collected_information.shipping_details Object No
collected_information.shipping_details.name String Yes
collected_information.shipping_details.address Object Yes
collected_information.shipping_details.address.line2 String No
collected_information.shipping_details.address.line1 String Yes
collected_information.shipping_details.address.postal_code String No
collected_information.shipping_details.address.country String Yes
collected_information.shipping_details.address.state String No
collected_information.shipping_details.address.city String No
line_items[] Array No

A list of items the customer is purchasing.

When updating line items, you must retransmit the entire array of line items.

To retain an existing line item, specify its id.

To update an existing line item, specify its id along with the new values of the fields to update.

To add a new line item, specify one of price or price_data and quantity.

To remove an existing line item, omit the line item's ID from the retransmitted array.

To reorder a line item, specify it at the desired position in the retransmitted array.

line_items[].id String No
line_items[].price String No
line_items[].adjustable_quantity Object No
line_items[].adjustable_quantity.minimum Integer No
line_items[].adjustable_quantity.enabled Boolean Yes
line_items[].adjustable_quantity.maximum Integer No
line_items[].tax_rates No
line_items[].price_data Object No
line_items[].price_data.unit_amount Integer No
line_items[].price_data.unit_amount_decimal String No
line_items[].price_data.product String No
line_items[].price_data.recurring Object No
line_items[].price_data.recurring.interval String Yes

Valid values:

  • "month"
  • "day"
  • "week"
  • "year"
line_items[].price_data.recurring.interval_count Integer No
line_items[].price_data.tax_behavior String No

Valid values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
line_items[].price_data.currency String Yes
line_items[].price_data.product_data Object No
line_items[].price_data.product_data.name String Yes
line_items[].price_data.product_data.description String No
line_items[].price_data.product_data.tax_code String No
line_items[].price_data.product_data.images[] Array No
line_items[].price_data.product_data.metadata Object No
line_items[].price_data.product_data.unit_label String No
line_items[].quantity Integer No
line_items[].metadata No
shipping_options No

The shipping rate options to apply to this Session. Up to a maximum of 5.

expand[] Array No

Specifies which fields in the response should be expanded.

metadata No

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

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.