Checkouts
4 endpoints. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.
Checkouts waiting for the buyer's own payment, abandoned ones, or ones still open at a provider
GET
/v1/store/checkoutsOr name the store: GET /v1/stores/{storeId}/checkouts
Parameters
state"awaiting_payment" | "abandoned" | "in_progress"querycursorstring | nullquerylimitinteger | stringqueryqstringqueryprovider"shopfast_pay" | "sandbox" | "stripe" | "paypal" | "btcpay" | "manual" | "plugin" | "crypto_direct" | "stripe_keys" | "paypal_keys" | "square" | "mollie" | "razorpay" | "paystack" | "nowpayments" | "cryptomus" | "paypal_email" | "shopify" | "paddle" | "heleket" | "sumup" | "authorize_net" | "nmi" | "skinloop" | "cashapp" | "paypal_ff" | "gift_codes" | nullquerysort"created" | "expires" | "buyer" | "items" | "total" | "how"querydir"asc" | "desc"query
Response ListCheckoutsResponse
itemsCheckoutRow[]requirednextCursorCursor | nullrequiredcountsCheckoutCountsrequired
Example
curl "https://api.shopfa.st/v1/store/checkouts" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/checkouts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/checkouts",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/checkouts", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
One checkout that is not an order: awaiting payment, abandoned or still open at a provider
GET
/v1/store/checkouts/{sessionId}Or name the store: GET /v1/stores/{storeId}/checkouts/{sessionId}
Parameters
sessionIdcs_…pathrequired
Response CheckoutRow
sessionIdCheckoutSessionIdrequiredstateCheckoutStaterequiredbuyerEmailEmailrequiredbuyerNamestringrequiredbuyerCountryCountryCoderequireditemsobject[]requiredproductIdProductIdrequirednamestringrequiredtypeProductTyperequiredquantityintegerrequired
currencyCurrencyCoderequiredtotalMinorMinorUnitsrequiredproviderGatewayProviderrequiredmethodPaymentMethod | nullrequired
8 more fields
manualobject | nullrequiredcustomerIdCustomerId | nullrequiredcreatedAtTimestamprequiredexpiresAtTimestamprequiredsubmittedAtTimestamp | nullrequiredmarkablebooleanrequiredorderIdOrderId | nullrequiredreferencestringrequired
Example
curl "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Manual methods: record that the buyer paid. Creates the order and starts delivery
POST
/v1/store/checkouts/{sessionId}/mark-paidOr name the store: POST /v1/stores/{storeId}/checkouts/{sessionId}/mark-paid
Parameters
sessionIdcs_…pathrequired
Body
notestring
Response OrderDetail
idOrderIdrequirednumberstringrequiredstoreIdStoreIdrequiredcustomerCustomerRefrequireditemsOrderItem[]requiredfeesFeeBreakdownrequiredproviderGatewayProviderrequiredpaymentMethodPaymentMethodrequiredcoveredByFreeCover | nullrequiredstatusOrderStatusrequired
24 more fields
isTestbooleanrequiredcreatedAtTimestamprequiredpaidAtTimestamp | nullrequiredrefundedMinorMinorUnitsrequiredstepsFulfillmentStep[]requiredrefundsOrderRefund[]requiredcustomFieldsobject[]requiredidstringrequiredlabelstringrequiredvaluestringrequired
buyerNotestringrequiredclientobject | nullrequireddiscountsobject[]requiredcodestringrequiredtitlestringrequiredamountMinorMinorUnitsrequired
giftCardobject | nullrequiredstoreCreditMinorMinorUnitsrequiredaffiliateobject | nullrequiredpaymentobjectrequiredproviderPaymentIdstringrequiredproviderUrlstringrequiredmode"test" | "live" | nullrequired
deliveredobjectrequiredkeysOrderDeliveredKey[]requireddownloadsobject[]requiredproductIdProductIdrequirednamestringrequireddownloadsintegerrequired
discordRolesobject[]requiredroleNamestringrequiredstatusstringrequired
giftCardsobject[]requiredlast4stringrequiredamountMinorMinorUnitsrequired
notesOrderNote[]requiredmanualobject | nullrequiredblockedobjectrequiredemailbooleanrequiredipbooleanrequired
discordUserIdstringrequiredorderPageUrlstringrequiredfulfilledAtTimestamp | nullrequiredrefundedAtTimestamp | nullrequiredattentionobject | nullrequiredclaimsobject[]requiredidstringrequiredkind"claim" | "chargeback"requiredstatusstringrequiredreasonstringrequiredopenedAtTimestamprequiredclosedAtTimestamp | nullrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/mark-paid" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": ""
}'const res = await fetch('https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/mark-paid', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"note": ""
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/mark-paid",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"note": ""
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/mark-paid", strings.NewReader(`{
"note": ""
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Close a checkout that will not be paid (releases held stock, gift card balance and store credit). A buyer waiting to pay hears why
POST
/v1/store/checkouts/{sessionId}/cancelOr name the store: POST /v1/stores/{storeId}/checkouts/{sessionId}/cancel
Parameters
sessionIdcs_…pathrequired
Body
reasonstring
Response CheckoutRow
sessionIdCheckoutSessionIdrequiredstateCheckoutStaterequiredbuyerEmailEmailrequiredbuyerNamestringrequiredbuyerCountryCountryCoderequireditemsobject[]requiredproductIdProductIdrequirednamestringrequiredtypeProductTyperequiredquantityintegerrequired
currencyCurrencyCoderequiredtotalMinorMinorUnitsrequiredproviderGatewayProviderrequiredmethodPaymentMethod | nullrequired
8 more fields
manualobject | nullrequiredcustomerIdCustomerId | nullrequiredcreatedAtTimestamprequiredexpiresAtTimestamprequiredsubmittedAtTimestamp | nullrequiredmarkablebooleanrequiredorderIdOrderId | nullrequiredreferencestringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/cancel" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": ""
}'const res = await fetch('https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reason": ""
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/cancel",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"reason": ""
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/checkouts/cs_0123456789abcdefghjk/cancel", strings.NewReader(`{
"reason": ""
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)