Home / Servers / Stripe API / post_checkout_sessions

Create a Checkout Session

An MCP tool from the Stripe API server, hosted on mcp.hjlabs.in.

Create a Checkout Session Creates a Checkout Session object. [POST /v1/checkout/sessions]

Name on the gateway: stripe_api__post_checkout_sessions · may change things.

Parameters

NameTypeDescription
adaptive_pricingobjectSettings for price localization with Adaptive Pricing.
after_expirationobjectConfigure actions after a Checkout Session has expired. You can't set this…
allow_promotion_codesbooleanEnables user redeemable promotion codes.
allowed_payment_method_typesarrayA list of the types of payment methods (e.g., card) this Checkout Session can…
automatic_taxobjectSettings for automatic tax lookup for this session and resulting payments…
billing_address_collectionauto | requiredSpecify whether Checkout should collect the customer's billing address.…
branding_settingsobjectThe branding settings for the Checkout Session. This parameter is not allowed…
cancel_urlstringIf set, Checkout displays a back button and customers will be directed to this…
client_reference_idstringA unique string to reference the Checkout Session. This can be a customer ID…
consent_collectionobjectConfigure fields for the Checkout Session to gather active consent from…
currencystringThree-letter ISO currency code, in lowercase. Must be a supported currency.…
custom_fieldsarrayCollect additional information from your customer using custom fields. Up to 3…
custom_textobjectDisplay additional text for your customers using custom text. You can't set…
customerstringID of an existing Customer, if one exists. In payment mode, the customer’s…
customer_accountstringID of an existing Account, if one exists. Has the same behavior as customer.
customer_creationalways | if_requiredConfigure whether a Checkout Session creates a Customer during Session…
customer_emailstringIf provided, this value will be used when the Customer object is created. If…
customer_updateobjectControls what fields on Customer can be updated by the Checkout Session. Can…
discountsarrayThe coupon or promotion code to apply to this Session. Currently, only up to…
excluded_payment_method_typesarrayA list of the types of payment methods (e.g., card) that should be excluded…
expandarraySpecifies which fields in the response should be expanded.
expires_atintegerThe Epoch time in seconds at which the Checkout Session will expire. It can be…
integration_identifierstringThe integration identifier for this Checkout Session. Multiple Checkout…
invoice_creationobjectGenerate a post-purchase Invoice for one-time payments.
line_itemsarrayA list of items the customer is purchasing. Use this parameter to pass…
localestringThe IETF language tag of the locale Checkout is displayed in. If blank or…
managed_paymentsobjectSettings for Managed Payments for this Checkout Session and resulting…
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful…
modepayment | setup | subscriptionThe mode of the Checkout Session. Pass subscription if the Checkout Session…
name_collectionobjectControls name collection settings for the session. You can configure Checkout…
optional_itemsarrayA list of optional items the customer can add to their order at checkout. Use…
origin_contextmobile_app | webWhere the user is coming from. This informs the optimizations that are applied…
payment_intent_dataobjectA subset of parameters to be passed to PaymentIntent creation for Checkout…
payment_method_collectionalways | if_requiredSpecify whether Checkout should collect a payment method. When set to…
payment_method_configurationstringThe ID of the payment method configuration to use with this Checkout session.
payment_method_dataobjectThis parameter allows you to set some attributes on the payment method created…
payment_method_optionsobjectPayment-method-specific configuration.
permissionsobjectThis property is used to set up permissions for various actions (for example…
phone_number_collectionobjectControls phone number collection settings for the session. We recommend that…
redirect_on_completionalways | if_required | neverThis parameter applies to ui_mode: embedded_page. Learn more about the…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "stripe_api__post_checkout_sessions",
  "arguments": {}
}

Or connect the Stripe API server directly, which lists 606 tools including this one:

Run in your terminal
claude mcp add --transport http hj-stripe-api https://mcp.hjlabs.in/mcp/stripe-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create a checkout session tool with adaptive_pricing set to ….

More from Stripe API