Meet Toki Operator

Docs/Manage API

Wallet passes

Apple Wallet and Google Wallet pass designs, and the passes members have installed.

A pass design decides what the Apple Wallet and Google Wallet pass looks like and who gets it: all members, or those of one membership, one store, or both. When you save or delete a design, Toki updates the passes members have installed in the background.

query

walletPass#

Returns a pass design by id. Without id, returns a template for a new, inactive design: the settings of your most recent default design, or a starter design if you have none.

Arguments

  • idString

    The design to return. Leave it out to get a template for a new one.

Returns

TokiWalletPass

A wallet pass design for Apple Wallet and Google Wallet, for all members or limited to a membership, a store or both.

  • idID

    null only in the template that walletPass returns when called without id.

  • tierIdID

    The TokiMembership whose members get this design; null for a default design.

  • shopIdID

    The store this design is for; null for all stores.

  • activeBoolean!

    Whether members get this design; inactive designs are drafts.

  • createdAtString

    Only set in walletPasses results.

  • nameString

    The membership's name, Default for a default design, or Membership deleted if its membership was deleted. Only set in walletPasses results.

  • shopNameString

    The store's name, or its domain if it has none; null for all stores. Only set in walletPasses results.

  • settingsTokiWalletPassSettings!

    The look and content of a pass: colors, images, fields, QR code, punch card stamps and locations.

query WalletPass($id: String) {
  walletPass(id: $id) {
    id
    tierId
    shopId
    active
    createdAt
    name
    shopName
    settings {
      headerType
      description
      backgroundColor
      foregroundColor
      storeCreditIds {
        header
        secondary
        secondarySecond
      }
    }
  }
}
Variables
{
  "id": "4c8b3e9e-4d8b-4031-aa8b-3b784b8b3d0b"
}
Response
{
  "data": {
    "walletPass": {
      "id": "4c8b3e9e-4d8b-4031-aa8b-3b784b8b3d0b",
      "tierId": "756b35ca-766b-475d-a36b-32a4746b3437",
      "shopId": "62579d72-6357-4f05-a057-9a4c61579bdf",
      "active": true,
      "createdAt": "2026-10-14T09:30:00.000Z",
      "name": "Gold",
      "shopName": "Shop name",
      "settings": {
        "headerType": "Header type",
        "description": "Earn double points on every order in July.",
        "backgroundColor": "#FD4B01",
        "foregroundColor": "#FD4B01",
        "storeCreditIds": {
          "header": "Header",
          "secondary": "Secondary",
          "secondarySecond": "Secondary second"
        }
      }
    }
  }
}

walletPasses#

Lists your pass designs: default designs first, then membership designs in membership order. A member gets the active design of their highest-ranked membership that has one, or else an active default design; a design for their store wins over one for all stores.

Arguments

  • reverseBoolean

    Reverse the sort order.

Returns

TokiWalletPassConnection!

A page of TokiWalletPass in nodes, with pageInfo for the next page. Each item:

A wallet pass design for Apple Wallet and Google Wallet, for all members or limited to a membership, a store or both.

  • idID

    null only in the template that walletPass returns when called without id.

  • tierIdID

    The TokiMembership whose members get this design; null for a default design.

  • shopIdID

    The store this design is for; null for all stores.

  • activeBoolean!

    Whether members get this design; inactive designs are drafts.

  • createdAtString

    Only set in walletPasses results.

  • nameString

    The membership's name, Default for a default design, or Membership deleted if its membership was deleted. Only set in walletPasses results.

  • shopNameString

    The store's name, or its domain if it has none; null for all stores. Only set in walletPasses results.

  • settingsTokiWalletPassSettings!

    The look and content of a pass: colors, images, fields, QR code, punch card stamps and locations.

query WalletPasses($first: Int) {
  walletPasses(first: $first) {
    nodes {
      id
      tierId
      createdAt
      name
      settings {
        headerType
        description
        backgroundColor
        foregroundColor
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "first": 10
}
Response
{
  "data": {
    "walletPasses": {
      "nodes": [
        {
          "id": "36126c39-3512-4aa6-a412-691333126780",
          "tierId": "6705a2b1-6605-411e-a505-9f8b64059df8",
          "createdAt": "2026-10-14T09:30:00.000Z",
          "name": "Gold",
          "settings": {
            "headerType": "Header type",
            "description": "Earn double points on every order in July.",
            "backgroundColor": "#FD4B01",
            "foregroundColor": "#FD4B01"
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}
mutation

walletPassUpsert#

Creates a pass design when id is null, or replaces the design with that id; the fields mean the same as on TokiWalletPass. Toki then updates installed passes in the background: every Apple Wallet pass, and the Google Wallet passes that use this design. Requires a plan that includes wallet passes.

Input

TokiWalletPassUpsertInput!
  • idString

    The design to replace; null creates a new one.

  • tierIdString

    Limits the design to members of this membership; null makes it a default design.

  • shopIdString

    Limits the design to one of your stores; null or leaving it out applies it to all stores.

  • activeBoolean!Required

    true gives members this design; false keeps it as a draft.

  • settingsTokiWalletPassSettingsInput!Required

    What passes with this design show, and how they look.

Returns

TokiWalletPass

A wallet pass design for Apple Wallet and Google Wallet, for all members or limited to a membership, a store or both.

  • idID

    null only in the template that walletPass returns when called without id.

  • tierIdID

    The TokiMembership whose members get this design; null for a default design.

  • shopIdID

    The store this design is for; null for all stores.

  • activeBoolean!

    Whether members get this design; inactive designs are drafts.

  • createdAtString

    Only set in walletPasses results.

  • nameString

    The membership's name, Default for a default design, or Membership deleted if its membership was deleted. Only set in walletPasses results.

  • shopNameString

    The store's name, or its domain if it has none; null for all stores. Only set in walletPasses results.

  • settingsTokiWalletPassSettings!

    The look and content of a pass: colors, images, fields, QR code, punch card stamps and locations.

mutation WalletPassUpsert($input: TokiWalletPassUpsertInput!) {
  walletPassUpsert(input: $input) {
    id
    tierId
    shopId
    active
    createdAt
    name
    shopName
    settings {
      headerType
      description
      backgroundColor
      foregroundColor
      storeCreditIds {
        header
        secondary
        secondarySecond
      }
    }
  }
}
Variables
{
  "input": {
    "id": "4a9cb09d-499c-4f0a-a89c-ad77479cabe4",
    "tierId": "68e1d285-67e1-40f2-a6e1-cf5f65e1cdcc",
    "shopId": "70d141e1-6fd1-404e-aed1-3ebb6dd13d28",
    "active": true,
    "settings": {
      "backgroundColor": "#FD4B01",
      "foregroundColor": "#FD4B01",
      "labelColor": "#FD4B01",
      "storeCard": {
        "headerFields": [
          {
            "key": "Key",
            "label": "Summer double points",
            "value": "Value"
          }
        ],
        "primaryFields": [
          {
            "key": "Key",
            "label": "Summer double points",
            "value": "Value"
          }
        ],
        "secondaryFields": [
          {
            "key": "Key",
            "label": "Summer double points",
            "value": "Value"
          }
        ],
        "backFields": [
          {
            "label": "Summer double points",
            "value": "Value",
            "dataDetectorType": "Data detector type"
          }
        ]
      }
    }
  }
}
Response
{
  "data": {
    "walletPassUpsert": {
      "id": "52c2ad3b-51c2-4ba8-a4c2-b06153c2aece",
      "tierId": "43be6087-42be-4ef4-a5be-63ad44be621a",
      "shopId": "7d0887c7-7c08-4634-af08-8aed7e08895a",
      "active": true,
      "createdAt": "2026-10-14T09:30:00.000Z",
      "name": "Gold",
      "shopName": "Shop name",
      "settings": {
        "headerType": "Header type",
        "description": "Earn double points on every order in July.",
        "backgroundColor": "#FD4B01",
        "foregroundColor": "#FD4B01",
        "storeCreditIds": {
          "header": "Header",
          "secondary": "Secondary",
          "secondarySecond": "Secondary second"
        }
      }
    }
  }
}
mutation

walletPassDelete#

Deletes a pass design. Toki then updates installed passes in the background, and passes that used it switch to the next design that matches the member, if any. Requires a plan that includes wallet passes.

Input

TokiWalletPassDeleteInput!
  • idString!Required

    The design to delete.

Returns

Boolean!

true when the change was made. Anything that stops it comes back as an error.

mutation WalletPassDelete($input: TokiWalletPassDeleteInput!) {
  walletPassDelete(input: $input)
}
Variables
{
  "input": {
    "id": "4f27f5b5-4e27-4422-ad27-f28f4c27f0fc"
  }
}
Response
{
  "data": {
    "walletPassDelete": true
  }
}
mutation

walletPassSettingsUpdate#

Updates settings that apply to all your wallet passes, without changing the passes members have installed. Requires a plan that includes wallet passes.

Input

TokiWalletPassSettingsUpdateInput!
  • allowPosAuthWithReferralCodeBoolean

    Lets staff identify a member at Shopify POS by their referral code, for example by scanning the referral QR code on their pass. Referral codes are public, so this is less secure than the personal QR code. Leaving it out keeps the current setting.

Returns

Boolean!

true when the change was made. Anything that stops it comes back as an error.

mutation WalletPassSettingsUpdate($input: TokiWalletPassSettingsUpdateInput!) {
  walletPassSettingsUpdate(input: $input)
}
Variables
{
  "input": {
    "allowPosAuthWithReferralCode": true
  }
}
Response
{
  "data": {
    "walletPassSettingsUpdate": true
  }
}

userWalletPasses#

Lists the Apple Wallet and Google Wallet passes a member has added, newest first, including ones they have removed since. While you have no active pass design, the list is empty and visible is false.

Arguments

  • reverseBoolean

    Reverse the sort order.

  • userIdID!Required

    The member whose passes to list.

  • startDateString

    Only passes created at or after this ISO 8601 time.

  • endDateString

    Only passes created at or before this ISO 8601 time. A date alone means its start, in UTC.

Returns

TokiUserWalletPassList!

A page of TokiUserWalletPass in nodes, with pageInfo for the next page. Each item:

A pass a member added to Apple Wallet or Google Wallet.

  • idID!

    Unique only together with type.

  • typeString!

    Apple or Google.

  • shopString!

    The domain of the store the member added the pass from.

  • createdAtString!

    When the member added the pass to their wallet.

  • updatedAtString!
  • deletedAtString

    When the member removed the pass from their wallet; null while it's installed.

query UserWalletPasses($userId: ID!, $first: Int) {
  userWalletPasses(userId: $userId, first: $first) {
    nodes {
      id
      type
      shop
      createdAt
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "userId": "e01d453c-e11d-46cf-a21d-4862e31d49f5",
  "first": 10
}
Response
{
  "data": {
    "userWalletPasses": {
      "nodes": [
        {
          "id": "f23530ba-f335-424d-a035-2d94f1352f27",
          "type": "default",
          "shop": "Shop",
          "createdAt": "2026-10-14T09:30:00.000Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}