Docs
Dashboard
On this page

    Financials

    5 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.

    Gross to net earnings for a period, per currency, tied out to the ledger

    GET/v1/store/financials/statement

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

    balance:readrole: finance:readgetFinancialStatement

    Parameters

    • range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"query
    • fromstring | nullquery
    • tostring | nullquery
    • bucket"hour" | "day" | "week" | "month" | nullquery

    Response FinancialStatement

    • periodAnalyticsPeriodrequired
    • paymentModel"merchant_of_record" | "seller_gateway"required
    • statementsCurrencyStatement[]required
    • generatedAtTimestamprequired

    Example

    curl "https://api.shopfa.st/v1/store/financials/statement" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/financials/statement', {
      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/financials/statement",
        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/financials/statement", 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 statement row per month

    GET/v1/store/financials/monthly

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

    balance:readrole: finance:readgetMonthlyStatements

    Parameters

    • monthsinteger | stringquery

    Response MonthlyStatements

    • timezonestringrequired
    • monthsMonthlyRow[]required

    Example

    curl "https://api.shopfa.st/v1/store/financials/monthly" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/financials/monthly', {
      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/financials/monthly",
        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/financials/monthly", 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.

    Payouts matched to their ledger journals, and the balance roll-forward

    GET/v1/store/financials/payouts

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

    balance:readrole: finance:readgetPayoutReconciliation

    Parameters

    • range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"query
    • fromstring | nullquery
    • tostring | nullquery
    • bucket"hour" | "day" | "week" | "month" | nullquery

    Response PayoutReconciliation

    • periodAnalyticsPeriodrequired
    • payoutsPayoutReconRow[]required
    • rollForwardobject[]required
      • currencyCurrencyCoderequired
      • openingAvailableMinorintegerrequired
      • settledMinorintegerrequired
      • releasedMinorintegerrequired
      • refundsMinorintegerrequired
      • disputesMinorintegerrequired
      • otherMinorintegerrequired
      • payoutsMinorintegerrequired
      • closingAvailableMinorintegerrequired
      • differenceMinorintegerrequired
    • unmatchedintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/financials/payouts" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/financials/payouts', {
      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/financials/payouts",
        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/financials/payouts", 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.

    Tax collected and refunded by buyer country

    GET/v1/store/financials/tax

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

    balance:readrole: finance:readgetTaxReport

    Parameters

    • range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"query
    • fromstring | nullquery
    • tostring | nullquery
    • bucket"hour" | "day" | "week" | "month" | nullquery

    Response TaxReport

    • periodAnalyticsPeriodrequired
    • paymentModel"merchant_of_record" | "seller_gateway"required
    • remittedBy"shopfast" | "seller"required
    • rowsTaxRow[]required
    • totalsobject[]required
      • currencyCurrencyCoderequired
      • ordersintegerrequired
      • taxableSalesMinorintegerrequired
      • taxCollectedMinorintegerrequired
      • taxRefundedMinorintegerrequired
      • netTaxMinorintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/financials/tax" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/financials/tax', {
      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/financials/tax",
        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/financials/tax", 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.

    A statement, the months, payouts, tax or the raw ledger as CSV

    GET/v1/store/financials/export

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

    balance:readrole: finance:readexportFinancials

    Parameters

    • range"today" | "yesterday" | "7d" | "30d" | "90d" | "this_month" | "last_month" | "6mo" | "ytd" | "365d" | "custom"query
    • fromstring | nullquery
    • tostring | nullquery
    • bucket"hour" | "day" | "week" | "month" | nullquery
    • kind"statement" | "monthly" | "payouts" | "tax" | "ledger"queryrequired

    Response FinancialCsv

    • filenamestringrequired
    • csvstringrequired
    • rowsintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/financials/export" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/financials/export', {
      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/financials/export",
        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/financials/export", 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.

    Was this page helpful?