Docs
Dashboard
On this page

    Gateways

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

    Seller's own connected gateways

    GET/v1/store/gateways

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

    payments:readlistGateways

    Response ListGatewaysResponse

    • connectionsGatewayConnection[]required
    • availablePlatformGateway[]required

    Example

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

    Connect an own gateway (sandbox connects instantly; real providers return an onboarding URL). Calling it again resumes onboarding or picks up a finished one. Provider shopfast_pay sets up the account ShopFast pays merchant-of-record payouts to. A store set to ShopFast Pay that ShopFast Pay cannot serve moves to its own gateways once the connection can take payments.

    POST/v1/store/gateways

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

    payments:writeconnectGateway

    Body

    • 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"required

    Response ConnectGatewayResponse

    • connectionGatewayConnectionrequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired
    • onboardingUrlstringrequired

    Example

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

    Manual payment methods (own gateway stores)

    GET/v1/store/gateways/manual

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

    payments:readrole: payments:readlistManualMethods

    Response ListManualMethodsResponse

    • itemsManualPaymentMethod[]required

    Example

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

    Add a manual payment method (an enabled one moves a store ShopFast Pay cannot serve to its own gateways)

    POST/v1/store/gateways/manual

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

    payments:writerole: payments:writecreateManualMethod

    Body

    • namestringrequired
    • instructionsstringrequired
    • enabledbooleanrequired
    • payWithinHoursinteger

    Response CreateManualMethodResponse

    • idManualMethodIdrequired
    • namestringrequired
    • instructionsstringrequired
    • enabledbooleanrequired
    • payWithinHoursintegerrequired
    • positionintegerrequired
    • awaitingintegerrequired
    • createdAtTimestamprequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired

    Example

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

    Change a manual payment method

    PUT/v1/store/gateways/manual/{methodId}

    Or name the store: PUT /v1/stores/{storeId}/gateways/manual/{methodId}

    payments:writerole: payments:writeupdateManualMethod

    Parameters

    • methodIdmpm_…pathrequired

    Body

    • namestringrequired
    • instructionsstringrequired
    • enabledbooleanrequired
    • payWithinHoursinteger

    Response UpdateManualMethodResponse

    • idManualMethodIdrequired
    • namestringrequired
    • instructionsstringrequired
    • enabledbooleanrequired
    • payWithinHoursintegerrequired
    • positionintegerrequired
    • awaitingintegerrequired
    • createdAtTimestamprequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired

    Example

    curl -X PUT "https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "string",
      "instructions": "string",
      "enabled": false,
      "payWithinHours": 72
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk', {
      method: 'PUT',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "name": "string",
        "instructions": "string",
        "enabled": false,
        "payWithinHours": 72
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "PUT",
        "https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "name": "string",
          "instructions": "string",
          "enabled": False,
          "payWithinHours": 72
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk", strings.NewReader(`{
      "name": "string",
      "instructions": "string",
      "enabled": false,
      "payWithinHours": 72
    }`))
    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.

    Remove a manual payment method (checkouts already waiting keep their instructions)

    DELETE/v1/store/gateways/manual/{methodId}

    Or name the store: DELETE /v1/stores/{storeId}/gateways/manual/{methodId}

    payments:writerole: payments:writedeleteManualMethod

    Parameters

    • methodIdmpm_…pathrequired

    Response Ok

    • okbooleanrequired

    Example

    curl -X DELETE "https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk', {
      method: 'DELETE',
      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(
        "DELETE",
        "https://api.shopfa.st/v1/store/gateways/manual/mpm_0123456789abcdefghjk",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("DELETE", "https://api.shopfa.st/v1/store/gateways/manual/mpm_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.

    Connect the seller's BTCPay Server store: checks the key and registers ShopFast's webhook

    POST/v1/store/gateways/btcpay

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

    payments:writerole: payments:writeconnectBtcPay

    Body

    • serverUrlstringrequired
    • btcpayStoreIdstringrequired
    • apiKeystringrequired

    Response GatewayConnected

    • connectionGatewayConnectionrequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired

    Example

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

    Connect a gateway with the seller's own API keys: checks them with the provider, sets up payment events and seals them. A store set to ShopFast Pay that ShopFast Pay cannot serve moves to its own gateways

    POST/v1/store/gateways/{provider}/keys

    Or name the store: POST /v1/stores/{storeId}/gateways/{provider}/keys

    payments:writerole: payments:writeconnectKeyedGateway

    Parameters

    • provider"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"pathrequired

    Body

    • keysobjectrequired

    Response GatewayConnected

    • connectionGatewayConnectionrequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired

    Example

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

    Change a connected gateway's optional settings without reconnecting (Stripe: the publishable key and the payment method configuration): checked with the provider, sealed with the keys

    POST/v1/store/gateways/{provider}/settings

    Or name the store: POST /v1/stores/{storeId}/gateways/{provider}/settings

    payments:writerole: payments:writeupdateKeyedSettings

    Parameters

    • provider"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"pathrequired

    Body

    • settingsobjectrequired

    Response KeyedPayOptions

    • optionsstring[]required
    • atCheckoutstring[]required
    • readAtTimestamp | nullrequired
    • notestringrequired
    • inPagebooleanrequired
    • paymentMethodConfigstringrequired

    Example

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

    Read the ways to pay the seller turned on at the provider again (Stripe's payment method configuration) and offer them at checkout

    POST/v1/store/gateways/{provider}/options/refresh

    Or name the store: POST /v1/stores/{storeId}/gateways/{provider}/options/refresh

    payments:writerole: payments:writerefreshKeyedOptions

    Parameters

    • provider"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"pathrequired

    Response KeyedPayOptions

    • optionsstring[]required
    • atCheckoutstring[]required
    • readAtTimestamp | nullrequired
    • notestringrequired
    • inPagebooleanrequired
    • paymentMethodConfigstringrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/gateways/stripe_keys/options/refresh" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/gateways/stripe_keys/options/refresh', {
      method: 'POST',
      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(
        "POST",
        "https://api.shopfa.st/v1/store/gateways/stripe_keys/options/refresh",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/gateways/stripe_keys/options/refresh", 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.

    Shopify's page where the seller approves their own app (after connecting its keys). Its state works 15 minutes, for this store and member

    GET/v1/store/gateways/shopify/authorize

    Or name the store: GET /v1/stores/{storeId}/gateways/shopify/authorize

    payments:readrole: payments:writeshopifyAuthorizeUrl

    Response ShopifyAuthorizeUrlResponse

    • urlstringrequired

    Example

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

    Finish connecting Shopify with the query Shopify sent to /settings/payments/shopify: checks it, takes the app's token and adds ShopFast's webhooks

    POST/v1/store/gateways/shopify/callback

    Or name the store: POST /v1/stores/{storeId}/gateways/shopify/callback

    payments:writerole: payments:writecompleteShopifyConnect

    Body

    • codestringrequired
    • hmacstringrequired
    • shopstringrequired
    • statestringrequired
    • timestampstringrequired
    • hoststring | null

    Response GatewayConnected

    • connectionGatewayConnectionrequired
    • paymentModelPaymentModel | nullrequired
    • switchedToOwnbooleanrequired

    Example

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

    Disconnect a gateway: new checkouts stop using it; paid orders and refunds keep working where the provider allows

    DELETE/v1/store/gateways/{provider}

    Or name the store: DELETE /v1/stores/{storeId}/gateways/{provider}

    payments:writerole: payments:writedisconnectGateway

    Parameters

    • 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"pathrequired

    Response DisconnectGatewayResponse

    • connectionGatewayConnectionrequired

    Example

    curl -X DELETE "https://api.shopfa.st/v1/store/gateways/shopfast_pay" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/gateways/shopfast_pay', {
      method: 'DELETE',
      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(
        "DELETE",
        "https://api.shopfa.st/v1/store/gateways/shopfast_pay",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("DELETE", "https://api.shopfa.st/v1/store/gateways/shopfast_pay", 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.

    Gift cards: the cards the store takes (the defaults until the first save) and how many codes wait for review

    GET/v1/store/gateways/gift-codes

    Or name the store: GET /v1/stores/{storeId}/gateways/gift-codes

    payments:readrole: payments:readgetGiftCodeSettings

    Response GiftCodeSettingsView

    • settingsGiftCodeSettingsrequired
    • connectedbooleanrequired
    • savedbooleanrequired
    • pendingintegerrequired
    • storeCurrencyCurrencyCoderequired

    Example

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

    Gift cards: save the cards, their values, pictures and Eneba and G2A links (links are checked)

    PUT/v1/store/gateways/gift-codes

    Or name the store: PUT /v1/stores/{storeId}/gateways/gift-codes

    payments:writerole: payments:writesaveGiftCodeSettings

    Body

    • typesobject[]required
      • idstringrequired
      • preset"binance" | "steam" | "custom"required
      • enabledbooleanrequired
      • namestringrequired
      • imageobject | null
      • currenciesobject[]required
        • currency"USD" | "EUR" | "GBP" | "CAD" | "AUD" | "INR" | "NPR" | "JPY"required
        • unitstringrequired
        • facesobject[]required
      • linksobject
        • enebastring
        • g2astring
      • instructionsstring
    • change"store_credit" | "none"
    • reviewHoursinteger

    Response GiftCodeSettingsView

    • settingsGiftCodeSettingsrequired
    • connectedbooleanrequired
    • savedbooleanrequired
    • pendingintegerrequired
    • storeCurrencyCurrencyCoderequired

    Example

    curl -X PUT "https://api.shopfa.st/v1/store/gateways/gift-codes" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "types": [
        {
          "id": "string",
          "preset": "binance",
          "enabled": false,
          "name": "string",
          "currencies": [
            {
              "currency": "USD",
              "unit": "string",
              "faces": [
                {
                  "valueMinor": null
                }
              ]
            }
          ]
        }
      ],
      "change": "store_credit",
      "reviewHours": 48
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/gateways/gift-codes', {
      method: 'PUT',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "types": [
          {
            "id": "string",
            "preset": "binance",
            "enabled": false,
            "name": "string",
            "currencies": [
              {
                "currency": "USD",
                "unit": "string",
                "faces": [
                  {
                    "valueMinor": null
                  }
                ]
              }
            ]
          }
        ],
        "change": "store_credit",
        "reviewHours": 48
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "PUT",
        "https://api.shopfa.st/v1/store/gateways/gift-codes",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "types": [
            {
              "id": "string",
              "preset": "binance",
              "enabled": False,
              "name": "string",
              "currencies": [
                {
                  "currency": "USD",
                  "unit": "string",
                  "faces": [
                    {
                      "valueMinor": None
                    }
                  ]
                }
              ]
            }
          ],
          "change": "store_credit",
          "reviewHours": 48
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/gateways/gift-codes", strings.NewReader(`{
      "types": [
        {
          "id": "string",
          "preset": "binance",
          "enabled": false,
          "name": "string",
          "currencies": [
            {
              "currency": "USD",
              "unit": "string",
              "faces": [
                {
                  "valueMinor": null
                }
              ]
            }
          ]
        }
      ],
      "change": "store_credit",
      "reviewHours": 48
    }`))
    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?