Docs
Dashboard
On this page

    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/checkouts

    Or name the store: GET /v1/stores/{storeId}/checkouts

    orders:readrole: orders:readlistCheckouts

    Parameters

    • state"awaiting_payment" | "abandoned" | "in_progress"query
    • cursorstring | nullquery
    • limitinteger | stringquery
    • qstringquery
    • provider"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" | nullquery
    • sort"created" | "expires" | "buyer" | "items" | "total" | "how"query
    • dir"asc" | "desc"query

    Response ListCheckoutsResponse

    • itemsCheckoutRow[]required
    • nextCursorCursor | nullrequired
    • countsCheckoutCountsrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    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}

    orders:readrole: orders:readgetCheckout

    Parameters

    • sessionIdcs_…pathrequired

    Response CheckoutRow

    • sessionIdCheckoutSessionIdrequired
    • stateCheckoutStaterequired
    • buyerEmailEmailrequired
    • buyerNamestringrequired
    • buyerCountryCountryCoderequired
    • itemsobject[]required
      • productIdProductIdrequired
      • namestringrequired
      • typeProductTyperequired
      • quantityintegerrequired
    • currencyCurrencyCoderequired
    • totalMinorMinorUnitsrequired
    • providerGatewayProviderrequired
    • methodPaymentMethod | nullrequired
    8 more fields
    • manualobject | nullrequired
    • customerIdCustomerId | nullrequired
    • createdAtTimestamprequired
    • expiresAtTimestamprequired
    • submittedAtTimestamp | nullrequired
    • markablebooleanrequired
    • orderIdOrderId | nullrequired
    • referencestringrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Manual methods: record that the buyer paid. Creates the order and starts delivery

    POST/v1/store/checkouts/{sessionId}/mark-paid

    Or name the store: POST /v1/stores/{storeId}/checkouts/{sessionId}/mark-paid

    orders:writerole: orders:writemarkCheckoutPaid

    Parameters

    • sessionIdcs_…pathrequired

    Body

    • notestring

    Response OrderDetail

    • idOrderIdrequired
    • numberstringrequired
    • storeIdStoreIdrequired
    • customerCustomerRefrequired
    • itemsOrderItem[]required
    • feesFeeBreakdownrequired
    • providerGatewayProviderrequired
    • paymentMethodPaymentMethodrequired
    • coveredByFreeCover | nullrequired
    • statusOrderStatusrequired
    24 more fields
    • isTestbooleanrequired
    • createdAtTimestamprequired
    • paidAtTimestamp | nullrequired
    • refundedMinorMinorUnitsrequired
    • stepsFulfillmentStep[]required
    • refundsOrderRefund[]required
    • customFieldsobject[]required
      • idstringrequired
      • labelstringrequired
      • valuestringrequired
    • buyerNotestringrequired
    • clientobject | nullrequired
    • discountsobject[]required
      • codestringrequired
      • titlestringrequired
      • amountMinorMinorUnitsrequired
    • giftCardobject | nullrequired
    • storeCreditMinorMinorUnitsrequired
    • affiliateobject | nullrequired
    • paymentobjectrequired
      • providerPaymentIdstringrequired
      • providerUrlstringrequired
      • mode"test" | "live" | nullrequired
    • deliveredobjectrequired
      • keysOrderDeliveredKey[]required
      • downloadsobject[]required
        • productIdProductIdrequired
        • namestringrequired
        • downloadsintegerrequired
      • discordRolesobject[]required
        • roleNamestringrequired
        • statusstringrequired
      • giftCardsobject[]required
        • last4stringrequired
        • amountMinorMinorUnitsrequired
    • notesOrderNote[]required
    • manualobject | nullrequired
    • blockedobjectrequired
      • emailbooleanrequired
      • ipbooleanrequired
    • discordUserIdstringrequired
    • orderPageUrlstringrequired
    • fulfilledAtTimestamp | nullrequired
    • refundedAtTimestamp | nullrequired
    • attentionobject | nullrequired
    • claimsobject[]required
      • idstringrequired
      • kind"claim" | "chargeback"required
      • statusstringrequired
      • reasonstringrequired
      • openedAtTimestamprequired
      • closedAtTimestamp | 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    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}/cancel

    Or name the store: POST /v1/stores/{storeId}/checkouts/{sessionId}/cancel

    orders:writerole: orders:writecancelCheckout

    Parameters

    • sessionIdcs_…pathrequired

    Body

    • reasonstring

    Response CheckoutRow

    • sessionIdCheckoutSessionIdrequired
    • stateCheckoutStaterequired
    • buyerEmailEmailrequired
    • buyerNamestringrequired
    • buyerCountryCountryCoderequired
    • itemsobject[]required
      • productIdProductIdrequired
      • namestringrequired
      • typeProductTyperequired
      • quantityintegerrequired
    • currencyCurrencyCoderequired
    • totalMinorMinorUnitsrequired
    • providerGatewayProviderrequired
    • methodPaymentMethod | nullrequired
    8 more fields
    • manualobject | nullrequired
    • customerIdCustomerId | nullrequired
    • createdAtTimestamprequired
    • expiresAtTimestamprequired
    • submittedAtTimestamp | nullrequired
    • markablebooleanrequired
    • orderIdOrderId | nullrequired
    • referencestringrequired

    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)
    Try it with your key

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Was this page helpful?