curl -X PUT https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"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"
}'
{
"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": []
}
Update Checkout Session
Update an existing checkout session by modifying items, shipping address, or fulfillment options
PUT
/
v1
/
checkouts
/
:id
curl -X PUT https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"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"
}'
{
"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": []
}
Documentation Index
Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint updates an existing Checkout Session. You can modify line items, buyer information, shipping address, or select different fulfillment options. The response will include recalculated totals.
Authentication
This endpoint requires a valid API key withcheckouts:write permissions.
Authorization: Bearer YOUR_API_KEY
Path Parameters
Unique identifier for the checkout session
Request Body
Updated fulfillment address
Identifier for the selected fulfillment option
Response
Returns the updated checkout session with recalculated totals.curl -X PUT https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"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"
}'
{
"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": []
}
⌘I