Get Stripe Connected ID

Get the Stripe Connected ID for a given store. Requires additional permissions.

Request Parameters

🏷️ header · unmarked parameters are query params

ParameterTypeRequiredDescription
Locally-Api-Token 🏷️stringYesLocally API token must be passed in the header to authenticate the API consumer.
store_idintegerYesThe ID of the store.
company_idintegerYesThe ID of the brand company.

Example Request

curl --get 'https://www.locally.com/headless/api/1.0/cart/checkout/stripe_connected_id' \
--header 'Locally-Api-Token: {{API_TOKEN}}' \
--data-urlencode 'store_id={{STORE_ID}}' \
--data-urlencode 'company_id={{COMPANY_ID}}'
const response = await fetch(
  'https://www.locally.com/headless/api/1.0/cart/checkout/stripe_connected_id?store_id={{STORE_ID}}&company_id={{COMPANY_ID}}',
  {
    headers: {
      'Locally-Api-Token': '{{API_TOKEN}}'
    }
  }
);
const data = await response.json();
import requests

response = requests.get(
    "https://www.locally.com/headless/api/1.0/cart/checkout/stripe_connected_id",
    params={
        "store_id": "{{STORE_ID}}",
        "company_id": "{{COMPANY_ID}}",
    },
    headers={"Locally-Api-Token": "{{API_TOKEN}}"},
)
data = response.json()

Your API token must have the Stripe Connected ID permission enabled (contact Locally customer service to request it), and the store identified by store_id must be an active dealer of the brand identified by company_id — otherwise the API responds with 401 Unauthorized or 404 Not Found respectively.

Example Response

{
  "success": true,
  "data": {
    "stripe_connected_id": "acct_1A2B3C4D5E6F7G8H",
    "session": {
      "id": "abc999"
    }
  },
  "msg": ""
}

Response Explanation

  • successfalse with HTTP 401 (error_code 1206) when your token lacks the Stripe Connected ID permission, or HTTP 404 (error_code 1329/1330) when the store is missing, not a dealer of company_id, or has no Stripe integration; the reason appears in msg.
  • data.stripe_connected_id — The store's Stripe Connect account ID (acct_...). Combine it with your marketplace secret key to build the Stripe setup intent used when authorizing payment.
  • data.session.id — The current session ID. It can change between calls, so always send the latest value in the Locally-Api-Session-Id header on your next request. Session IDs eventually expire.
Query Params
int32
required

The ID of the store.

int32
required

The ID of the brand company.

Headers
string
required

Locally API token must be passed in the header to authenticate the API consumer

Responses
200

Successful

400

Bad Request

401

Unauthorized

402

Request Failed

403

Forbidden

404

Not Found

429

Too Many Requests

500

Server Error

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!