curl -X GET https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "checkout_abc123",
"buyer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"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 an existing checkout session by its unique identifier
curl -X GET https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "checkout_abc123",
"buyer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"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": []
}
checkouts:read permissions.
Authorization: Bearer YOUR_API_KEY
not_ready_for_payment, ready_for_payment, completed, canceled, in_progresscurl -X GET https://api.stateset.com/v1/checkouts/checkout_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": "checkout_abc123",
"buyer": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"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": []
}