Docs
Dashboard
On this page

    Payouts

    1 endpoint. 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.

    Withdraw: a payout request from the withdrawable balance to the payout wallet, reviewed and sent by ShopFast

    POST/v1/store/payouts

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

    balance:writerole: finance:writerequestWithdrawal

    Body

    • amountMinorinteger | null

    Response Payout

    • idPayoutIdrequired
    • storeIdStoreIdrequired
    • amountMinorMinorUnitsrequired
    • feeMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • statusPayoutStatusrequired
    • arrivalDateIsoDaterequired
    • createdAtTimestamprequired
    • railPayoutRail | nullrequired
    • addressstringrequired
    4 more fields
    • originPayoutOriginrequired
    • txHashstringrequired
    • reasonstringrequired
    • paidAtTimestamp | nullrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/payouts" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "amountMinor": null
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/payouts', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "amountMinor": null
      }),
    });
    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/payouts",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "amountMinor": None
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/payouts", strings.NewReader(`{
      "amountMinor": null
    }`))
    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?