Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a pre-built checkout page
Build a custom integration with Elements
Build an in-app integration
In-person payments
Terminal
Payment Methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
Beyond payments
Incorporate your company
Crypto
Agentic commerce
    Overview
    Build your checkout flow for agentic commerce
    Testing
    Integrate the Agentic Commerce Protocol
      Build the Agentic Commerce Protocol checkout endpoints
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United Kingdom)
HomePaymentsAgentic commerceIntegrate the Agentic Commerce Protocol

Build the Agentic Commerce Protocol checkout endpointsPrivate preview

Learn about the Agentic Commerce Protocol specification.

You can use the Agentic Commerce Protocol (ACP) to enable AI agents to manage commerce transactions between buyers and sellers. This specification defines the methods and data structures for creating, updating and completing checkout flows.

You can find examples for REST integrations below.

Create a Checkout Session

You can create a new Checkout Session with buyer details, line items and shipping information.

Request

Specify the parameters required for your request.

ParameterTypeDescription
itemsarray Array of items you can purchase. Required
buyerhash optional Information about the buyer.
fulfilment_addresshash optional Address where the order will ship.

Example Request:

POST /checkouts { "items": [ { "id": "item_123", "quantity": 2 } ], "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "fulfillment_address": { "name": "John Doe", "line_one": "123 Main St", "line_two": "Apt 4B", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" } }

Response

The response returns the current state of the checkout from the seller.

ParameterTypeDescription
idstringUnique identifier for the Checkout Session. Required
buyerhash optional Information about the buyer.
payment_providerhash optional Payment provider configuration and supported payment methods.

status

string

Current status of the checkout process. Required

Possible values: not_ready_for_payment | ready_for_payment | completed | canceled | in_progress

currencystringThree-letter ISO currency code, in lowercase. Required
line_itemsarray Array of line items in the checkout process. Required
fulfilment_addresshash optional Address where the order will ship.
fulfilment_optionsarray Available shipping and fulfilment options. Required
fulfilment_option_idstring optionalID of the currently selected fulfilment option.
totalsarray Overview of charges and discounts. Required
messagesarray Array of messages or notifications related to the checkout process. Required
linksarray Array of links related to the checkout process. Required

Example response:

{ "id": "checkout_abc123", "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "payment_provider": { "provider": "stripe", "supported_payment_methods": ["card"] }, "status": "ready_for_payment", "currency": "usd", "line_items": [ { "id": "item_123", "item": { "id": "item_123", "quantity": 2 }, "base_amount": 2000, "discount": 0, "total": 2000, "subtotal": 2000, "tax": 0 } ], "fulfillment_address": { "name": "John Doe", "line_one": "123 Main St", "line_two": "Apt 4B", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" }, "fulfillment_options": [ { "type": "shipping", "id": "shipping_fast", "title": "Express Shipping", "subtitle": "2-3 business days", "carrier": "Shipping Co", "subtotal": 150, "tax": 0, "total": 150 } ], "fulfillment_option_id": "shipping_fast", "totals": [ { "type": "subtotal", "display_text": "Subtotal", "amount": 2000 }, { "type": "fulfillment", "display_text": "Shipping", "amount": 150 }, { "type": "tax", "display_text": "Tax", "amount": 100 }, { "type": "total", "display_text": "Total", "amount": 2250 } ], "messages": [], "links": [] }

Retrieve a Checkout object

To retrieve an existing Checkout Session using its ID, make a request to the appropriate API endpoint with the ID included in the request.

Request

Specify the parameters required for your request.

ParameterTypeDescription
idstringUnique identifier for the checkout process. Required

Example Request:

GET /checkouts/:id

Response

The response returns the current state of the checkout from the seller.

ParameterTypeDescription
idstringUnique identifier for the checkout session. Required
buyerhash optional Information about the buyer.
payment_providerhash optional Payment provider configuration and supported payment methods.

status

string

Current status of the checkout process. Required

Possible values: not_ready_for_payment | ready_for_payment | completed | canceled | in_progress

currencystringThree-letter ISO currency code, in lowercase. Required
line_itemsarray Array of line items in the checkout process. Required
fulfilment_addresshash optional Address where the order will ship.
fulfilment_optionsarray Available shipping and fulfilment options. Required
fulfilment_option_idstring optionalID of the currently selected fulfilment option.
totalsarray Overview of charges and discounts. Required
messagesarray Array of messages or notifications related to the checkout process. Required
linksarray Array of links related to the checkout process. Required

Example response:

{ "id": "checkout_abc123", "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "payment_provider": { "provider": "stripe", "supported_payment_methods": ["card"] }, "status": "ready_for_payment", "currency": "usd", "line_items": [ { "id": "item_123", "item": { "id": "item_123", "quantity": 2 }, "base_amount": 2000, "discount": 0, "total": 2000, "subtotal": 2000, "tax": 0 } ], "fulfillment_address": { "name": "John Doe", "line_one": "123 Main St", "line_two": "Apt 4B", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" }, "fulfillment_options": [ { "type": "shipping", "id": "shipping_fast", "title": "Express Shipping", "subtitle": "2-3 business days", "carrier": "Shipping Co", "subtotal": 150, "tax": 0, "total": 150 } ], "fulfillment_option_id": "shipping_fast", "totals": [ { "type": "subtotal", "display_text": "Subtotal", "amount": 2000 }, { "type": "fulfillment", "display_text": "Shipping", "amount": 150 }, { "type": "tax", "display_text": "Tax", "amount": 100 }, { "type": "total", "display_text": "Total", "amount": 2250 } ], "messages": [], "links": [] }

Update a Checkout Session

You can update an existing Checkout Session by modifying line items, shipping address or fulfilment options.

Request

Specify the parameters required for your request.

ParameterTypeDescription
idstringUnique identifier for the checkout process. Required
buyerhash optional Information about the buyer.
itemsarray optional Updated array of items to be purchased.
fulfilment_addresshash optional Updated fulfilment address.
fulfilment_option_idstring optionalIdentifier for the selected fulfilment option.

Example Request:

PUT /checkouts/:id { "items": [ { "id": "item_123", "quantity": 3 }, { "id": "item_456", "quantity": 1 } ], "fulfillment_address": { "name": "John Doe", "line_one": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "country": "US", "postal_code": "90210" }, "fulfillment_option_id": "shipping_fast" }

Response

The response returns the current state of the checkout from the seller.

ParameterTypeDescription
idstringUnique identifier for the Checkout Session. Required
buyerhash optional Information about the buyer.
payment_providerhash optional Payment provider configuration and supported payment methods.

status

string

Current status of the checkout process. Required

Possible values: not_ready_for_payment | ready_for_payment | completed | canceled | in_progress

currencystringThree-letter ISO currency code, in lowercase. Required
line_itemsarray Array of line items in the checkout process. Required
fulfilment_addresshash optional Address where the order will ship.
fulfilment_optionsarray Available shipping and fulfilment options. Required
fulfilment_option_idstring optionalID of the currently selected fulfilment option.
totalsarray Overview of charges and discounts. Required
messagesarray Array of messages or notifications related to the checkout process. Required
linksarray Array of links related to the checkout process. Required

Example response:

{ "id": "checkout_abc123", "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "payment_provider": { "provider": "stripe", "supported_payment_methods": ["card"] }, "status": "ready_for_payment", "currency": "usd", "line_items": [ { "id": "item_123", "item": { "id": "item_123", "quantity": 3 }, "base_amount": 3000, "discount": 0, "total": 3000, "subtotal": 3000, "tax": 0 }, { "id": "item_456", "item": { "id": "item_456", "quantity": 1 }, "base_amount": 500, "discount": 0, "total": 500, "subtotal": 500, "tax": 0 } ], "fulfillment_address": { "name": "John Doe", "line_one": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "country": "US", "postal_code": "90210" }, "fulfillment_options": [ { "type": "shipping", "id": "shipping_fast", "title": "Express Shipping", "subtitle": "2-3 business days", "carrier": "Shipping Co", "subtotal": 150, "tax": 0, "total": 150 } ], "fulfillment_option_id": "shipping_fast", "totals": [ { "type": "subtotal", "display_text": "Subtotal", "amount": 3500 }, { "type": "fulfillment", "display_text": "Shipping", "amount": 150 }, { "type": "tax", "display_text": "Tax", "amount": 100 }, { "type": "total", "display_text": "Total", "amount": 3750 } ], "messages": [], "links": [] }

Complete a Checkout

You can complete the checkout process by processing the payment and creating an order.

Request

Specify the parameters required for your request.

ParameterTypeDescription
idstringUnique identifier for the checkout process. Required
buyerhash optional Information about the buyer.
payment_datahash Payment method details for processing the transaction. Required

Example Request:

POST /checkouts/:id/complete { "payment_data": { "token": "spt_123", "provider": "stripe", "billing_address": { "name": "John Doe", "line_one": "123 Main St", "line_two": "Apt 4B", "city": "San Francisco", "state": "CA", "country": "US", "postal_code": "94105" } } }

Response

The response returns the current state of the checkout from the seller.

ParameterTypeDescription
idstringUnique identifier for the Checkout Session. Required
buyerhash optional Information about the buyer.
payment_providerhash optional Payment provider configuration and supported payment methods.

status

string

Current status of the checkout process. Required

Possible values: not_ready_for_payment | ready_for_payment | completed | canceled | in_progress

currencystringThree-letter ISO currency code, in lowercase. Required
line_itemsarray Array of line items in the checkout process. Required
fulfilment_addresshash optional Address where the order will ship.
fulfilment_optionsarray Available shipping and fulfilment options. Required
fulfilment_option_idstring optionalID of the currently selected fulfilment option.
totalsarray Overview of charges and discounts. Required
messagesarray Array of messages or notifications related to the checkout process. Required
linksarray Array of links related to the checkout process. Required

Example response:

{ "id": "checkout_abc123", "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "status": "completed", "currency": "usd", "line_items": [ { "id": "item_123", "item": { "id": "item_123", "quantity": 3 }, "base_amount": 3000, "discount": 0, "total": 3000, "subtotal": 3000, "tax": 0 }, { "id": "item_456", "item": { "id": "item_456", "quantity": 1 }, "base_amount": 500, "discount": 0, "total": 500, "subtotal": 500, "tax": 0 } ], "fulfillment_address": { "name": "John Doe", "line_one": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "country": "US", "postal_code": "90210" }, "fulfillment_options": [ { "type": "shipping", "id": "shipping_fast", "title": "Express Shipping", "subtitle": "2-3 business days", "carrier": "Shipping Co", "subtotal": 150, "tax": 0, "total": 150 } ], "fulfillment_option_id": "shipping_fast", "totals": [ { "type": "subtotal", "display_text": "Subtotal", "amount": 3500 }, { "type": "fulfillment", "display_text": "Shipping", "amount": 150 }, { "type": "tax", "display_text": "Tax", "amount": 100 }, { "type": "total", "display_text": "Total", "amount": 3750 } ], "messages": [], "links": [] }

Cancel a Checkout

You can cancel an existing Checkout Session if necessary.

Request

Specify the parameters required for your request.

ParameterTypeDescription
idstringUnique identifier for the checkout process. Required

Example Request:

POST /checkouts/:id/cancel {}

Response

The response returns the current state of the checkout from the seller.

ParameterTypeDescription
idstringUnique identifier for the Checkout Session. Required
buyerhash optional Information about the buyer.
payment_providerhash optional Payment provider configuration and supported payment methods.

status

string

Current status of the checkout process. Required

Possible values: not_ready_for_payment | ready_for_payment | completed | canceled | in_progress

currencystringThree-letter ISO currency code, in lowercase. Required
line_itemsarray Array of line items in the checkout process. Required
fulfilment_addresshash optional Address where the order will ship.
fulfilment_optionsarray Available shipping and fulfilment options. Required
fulfilment_option_idstring optionalID of the currently selected fulfilment option.
totalsarray Overview of charges and discounts. Required
messagesarray Array of messages or notifications related to the checkout process. Required
linksarray Array of links related to the checkout process. Required

Example response:

{ "id": "checkout_abc123", "buyer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+1234567890" }, "status": "canceled", "currency": "usd", "line_items": [ { "id": "item_123", "item": { "id": "item_123", "quantity": 3 }, "base_amount": 3000, "discount": 0, "total": 3000, "subtotal": 3000, "tax": 0 }, { "id": "item_456", "item": { "id": "item_456", "quantity": 1 }, "base_amount": 500, "discount": 0, "total": 500, "subtotal": 500, "tax": 0 } ], "fulfillment_address": { "name": "John Doe", "line_one": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "country": "US", "postal_code": "90210" }, "fulfillment_options": [ { "type": "shipping", "id": "shipping_fast", "title": "Express Shipping", "subtitle": "2-3 business days", "carrier": "Shipping Co", "subtotal": 150, "tax": 0, "total": 150 } ], "fulfillment_option_id": "shipping_fast", "totals": [ { "type": "subtotal", "display_text": "Subtotal", "amount": 3500 }, { "type": "fulfillment", "display_text": "Shipping", "amount": 150 }, { "type": "tax", "display_text": "Tax", "amount": 100 }, { "type": "total", "display_text": "Total", "amount": 3750 } ], "messages": [ { "type": "info", "content_type": "plain", "content": "Checkout cancelled: Customer changed their mind" } ], "links": [] }

Data structures

This section outlines the data structures involved in the checkout process.

Buyer

The buyer is an individual who initiates the purchase.

ParameterTypeDescription
fore_namestringThe forename of the buyer. Required
sur_namestringThe last name of the buyer. Required
emailstringThe email of the buyer. Required
phone_numberstring optionalThe phone number of the buyer.

Item

The Item is a product or service that the buyer requests to purchase, along with its quantity.

ParameterTypeDescription
idstringUnique identifier for the item. Required
quantityintegerThe requested quantity of the item for this checkout. Required

LineItem

The LineItem includes provides about the item added to the checkout, including the amount.

ParameterTypeDescription
idstringUnique identifier for the line item. Required
itemhash The item details. Required
base_amountintegerThe base amount of the line item. Required
discountintegerThe discount amount of the line item. Required
totalintegerThe total amount of the line item. Required
subtotalintegerThe subtotal amount of the line item. Required
taxintegerThe tax amount of the line item. Required

Address

The Address provides the buyer’s shipping or billing address.

ParameterTypeDescription
namestringName of the person to whom the items are fulfilled. Required
line_onestringAddress line 1 (e.g. road, PO Box or company name). Required
line_twostring optionalAddress line 2 (e.g. flat, suite, unit or building).
citystringCity, district, suburb, town or village. Required
statestringState, county, province or region. Required
countrystringTwo-letter country code (ISO 3166-1 alpha-2). Required
postal_codestringZIP or postal code. Required

PaymentData

The PaymentData provides the buyer’s payment details, including the tokenised value and the payment provider.

ParameterTypeDescription
tokenstringThe secure reference to a payment credential. Required
providerstringThe payment provider that the payment data is for. Required
billing_addresshash optional Billing address for the payment method.

Total

The Total provides a summary of the overall total.

ParameterTypeDescription

type

enum

The type of total. Required

Possible values: items_base_amount | items_discount | subtotal | discount | fulfillment | tax | fee | total

display_textstringThe display text for the total. Required
amountintegerThe amount of the total. Required

FulfilmentOption

Fulfilment options are either shipping or digital. See ShippingFulfilmentOption and DigitalFulfilmentOption for specific implementations.

ShippingFulfilmentOption

The ShippingFulfillmentOption defines the parameters for shipping fulfilment options, including the carrier information and delivery times.

ParameterTypeDescription

type

enum

The type of fulfilment option. Required

Possible values: shipping

idstringUnique identifier for the shipping fulfilment option. Required
titlestringThe title of the shipping fulfilment option. Required
subtitlestring optionalThe subtitle of the shipping fulfilment option.
carrierstring optionalThe carrier of the shipping fulfilment option.
earliest_delivery_timestring optionalThe earliest delivery time of the shipping fulfilment option (ISO 8601 format).
latest_delivery_timestring optionalThe latest delivery time of the shipping fulfilment option (ISO 8601 format).
subtotalintegerThe subtotal of the shipping fulfilment option. Required
taxintegerThe tax of the shipping fulfilment option. Required
totalintegerThe total of the shipping fulfilment option. Required

DigitalFulfilmentOption

The DigitalFulfilmentOption defines the parameters for digital fulfilment options, including the title and pricing information.

ParameterTypeDescription

type

enum

The type of fulfilment option. Required

Possible values: digital

idstringUnique identifier for the digital fulfilment option. Required
titlestringThe title of the digital fulfilment option. Required
subtitlestring optionalThe subtitle of the digital fulfilment option.
subtotalintegerThe subtotal of the digital fulfilment option. Required
taxintegerThe tax of the digital fulfilment option. Required
totalintegerThe total of the digital fulfilment option. Required

PaymentProvider

The PaymentProvider defines the seller’s supported payment provider and available methods.

ParameterTypeDescription

provider

string

The seller’s payment provider. Required

Possible values: stripe

supported_payment_methods

array

The payment methods allowed by the seller. Required

Possible values: card

Message

Messages are either informational or error messages.

InfoMessage

The InfoMessage represents informational messages, detailing the type and content.

ParameterTypeDescription

type

enum

String value representing message type.

Possible values: info

paramstring optionalRFC 9535 JSONPath to the component of the Checkout Session that the message references.

content_type

enum optional

The type of content of the message.

Possible values: plain | markdown

contentstringThe content of the message.

ErrorMessage

The ErrorMessage represents error messages, detailing the type and code.

ParameterTypeDescription

type

enum

String value representing message type.

Possible values: error

code

enum

The code of the error.

Possible values: missing | invalid | out_of_stock | payment_declined | requires_sign_in | requires_3ds

paramstring optionalRFC 9535 JSONPath to the component of the Checkout Session that the message references.

content_type

enum optional

The type of content of the message.

Possible values: plain | markdown

contentstringThe content of the message.

Error

The Error defines the parameters related to errors occurring during the checkout process.

ParameterTypeDescription

type

enum

The type of error. Required

Possible values: invalid_request | request_not_idempotent | processing_error | service_unavailable

codestringThe implementation-defined error code. Required
messagestringThe message of the error. Required
paramstring optionalRFC 9535 JSONPath to the component of the Checkout Session that the message references.

Link

The Link defines the parameters for links related to policies and agreements.

ParameterTypeDescription

type

enum

String value representing the type of link. Required

Possible values: terms_of_use | privacy_policy | seller_shop_policies

urlstringThe URL of the link. Required

Order

The Order provides the result of the checkout process and offers details to the buyer for order lookup.

ParameterTypeDescription
idstringUnique identifier for the order. Required
checkout_session_idstringReference to the Checkout Session that the order originated from. Required
permalink_urlstringThe permalink URL for the order. Required

Event

The Event defines the parameters for events related to order creation and updates.

ParameterTypeDescription

type

enum

The type of event. Required

Possible values: order_created | order_updated

datahash Event data containing order information. Required

OrderEventData

The OrderEventData includes data related to order events.

ParameterTypeDescription
typestringThe string value represents the type of event data. For order data, use the value order. Required
checkout_session_idstringID that identifies the Checkout Session that created this order. Required
permalink_urlstringThe URL points to the order. Customers can visit this URL and provide their email address to view order details. Required

status

enum

String representing the latest status of the order. Required

Possible values: created | manual_review | confirmed | canceled | shipped | fulfilled

refundsarray List of refunds that have been issued for the order. Required

Refund

The Refund defines the parameters for managing refunds associated with completed orders.

ParameterTypeDescription

type

enum

The type of refund. Required

Possible values: store_credit | original_payment

amountintegerThe amount of the refund. Required
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc