Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Square

Scalekit connector
Open markdown

The Square connector lets your AI agent act in each user's Square account. Each user signs in to Square once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 118 tools.

Tools
118
What they doRead · write · destructive
69 · 49 · 069 read49 write0 destructive
Users sign in with
OAuth app
Your own Square app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Square connection

    In AgentKit > Connections, create a Square connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Square connections use your own OAuth app. Register one with Square and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Square connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'square'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Square:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'square_bookings_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • square_booking_getGet one Square Appointments booking by its ID.Read-only

    Get Booking

    Get one Square Appointments booking by its ID. Returns the booking with status, start time, location, customer, notes, appointment segments, and version. Use this for a single booking; use square_bookings_list to find bookings.

    Inputs

    booking_idstringrequired
    The ID of the Booking object representing the to-be-retrieved booking. Example: zkras0xv0xwswx
  • square_bookings_listList Square Appointments bookings, optionally filtered by location, team member, customer, and start time range.Read-only

    List Bookings

    List Square Appointments bookings, optionally filtered by location, team member, customer, and start time range. Returns bookings with id, status, start time, location, customer, and appointment segments, plus a cursor. Use this to browse bookings; use square_booking_get for one booking by ID.

    Inputs

    cursorstring
    The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results. Example: CAISBQoDMTIzGAE
    customer_idstring
    The customer for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved. Example: W92WH6P11H4Z77CTET0RNTGFW8
    limitinteger
    The maximum number of results per page to return in a paged response. Example: 100
    location_idstring
    The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved. Example: L88917AVBK2S5
    start_at_maxstring
    The RFC 3339 timestamp specifying the latest of the start time. If this is not set, the time of 31 days after start_at_min is used. Example: 2026-11-30T00:00:00Z
    start_at_minstring
    The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used. Example: 2026-11-01T00:00:00Z
    team_member_idstring
    The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved. Example: TMXUrsBWWcHTt79t
  • square_break_types_listList the break types (such as Lunch) configured for the seller's locations.Read-only

    List Break Types

    List the break types (such as Lunch) configured for the seller's locations. Returns break types with id, name, expected duration, and paid flag, plus a cursor. Use this to find a break_type_id for timecard breaks.

    Inputs

    cursorstring
    A pointer to the next page of BreakType results to fetch. Example: CAISBQoDMTIzGAE
    limitinteger
    The maximum number of BreakType results to return per page. The number can range between 1 and 200. The default is 200. Example: 100
    location_idstring
    Filter the returned BreakType results to only those that are associated with the specified location. Example: L88917AVBK2S5
  • square_business_booking_profile_getGet the Square Appointments business booking profile of the seller.Read-only

    Get Business Booking Profile

    Get the Square Appointments business booking profile of the seller. Returns booking settings such as whether customers can book online, cancellation policy, and timezone. Use this to check how the seller accepts bookings.

    Inputs

    This tool takes no inputs.

  • square_card_getGet one Square card on file by its ID.Read-only

    Get Card

    Get one Square card on file by its ID. Returns the card with brand, last 4 digits, expiration, billing address, customer id, and enabled flag. Use this for a single card; use square_cards_list to find cards.

    Inputs

    card_idstringrequired
    Unique ID for the desired Card. Example: ccof:uIbfJXhXETSP197M3GB
  • square_cards_listList cards on file for the seller, optionally for one customer.Read-only

    List Cards

    List cards on file for the seller, optionally for one customer. Returns cards with id, brand, last 4 digits, expiration, cardholder name, and customer id, plus a cursor. Use this to find a card ID to charge with square_payment_create; use square_card_get for one card.

    Inputs

    cursorstring
    A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See Pagination for more information. Example: CAISBQoDMTIzGAE
    customer_idstring
    Limit results to cards associated with the customer supplied. By default, all cards owned by the merchant are returned. Example: W92WH6P11H4Z77CTET0RNTGFW8
    include_disabledboolean
    Includes disabled cards. By default, all enabled cards owned by the merchant are returned.
    reference_idstring
    Limit results to cards associated with the reference_id supplied. Example: ref-12345
    sort_orderstring
    Sorts the returned list by when the card was created with the specified order. This field defaults to ASC. Allowed values: DESC, ASC.one of DESCASC
  • square_catalog_info_getGet the Square Catalog API limits and the seller's standard unit descriptions.Read-only

    Get Catalog Info

    Get the Square Catalog API limits and the seller's standard unit descriptions. Returns batch size limits for upsert, delete, and retrieve calls, and standard measurement units. Use this before large batch catalog calls to stay within limits.

    Inputs

    This tool takes no inputs.