@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Class SquareClient

    Main Square client wrapper

    const square = createSquareClient({
    accessToken: process.env.SQUARE_ACCESS_TOKEN!,
    environment: 'sandbox',
    locationId: 'LXXX',
    });

    // Create a payment
    const payment = await square.payments.create({
    sourceId: 'cnon:card-nonce-ok',
    amount: 1000, // $10.00
    idempotencyKey: 'order-1042', // one key per order, so a retry can't charge twice
    });
    Index

    Cards on file (cards.create(), get, list, disable)

    checkout: CheckoutService
    customerGroups: CustomerGroupsService
    customers: CustomersService
    giftCards: GiftCardsService
    inventory: InventoryService
    invoices: InvoicesService
    locations: LocationsService

    OAuth token status for this client's access token (oauth.tokenStatus())

    payments: PaymentsService

    Refunds (refunds.refundPayment(), get, list)

    subscriptions: SubscriptionsService
    webhooks: { subscriptions: WebhookSubscriptionsService }

    Webhook subscription management (webhooks.subscriptions.*)

    • get sdk(): SquareClient

      Get the underlying Square SDK client Use this for advanced operations not covered by the wrapper

      Returns SquareClient