---
title: payments
description: >-
  Reference for the ShopifyQL `payments` table. Every metric and dimension,
  paired with worked example queries.
api_version: 2026-07
source_url:
  html: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/payments
  md: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/payments.md
api_name: shopifyql
---

# payments

The `payments` [schema](https://shopify.dev/docs/api/shopifyql/latest/schemas) captures payment activity at the transaction level. It's the payment-side view of money moving in and out, connected back to orders, customers, POS, gift cards, and channels.

### Use cases

* **Payment movement**: Show [`gross_payments`](#paymentsmetric-propertydetail-grosspayments), [`refunded_payments`](#paymentsmetric-propertydetail-refundedpayments), and [`net_payments`](#paymentsmetric-propertydetail-netpayments) by month to explain payment movement for a period.
* **POS reporting**: Group [`net_payments_excluding_gift_cards`](#paymentsmetric-propertydetail-netpaymentsexcludinggiftcards) by [`pos_location_name`](#paymentsdimension-propertydetail-poslocationname) to compare payment performance across your physical locations.
* **Order coverage**: Use [`orders_with_transactions`](#paymentsmetric-propertydetail-orderswithtransactions) and [`transactions`](#paymentsmetric-propertydetail-transactions) together to distinguish order coverage from transaction volume.
* **Gift card activity**: Report [`redeemed_gift_card_value`](#paymentsmetric-propertydetail-redeemedgiftcardvalue) and [`refunded_gift_card_value`](#paymentsmetric-propertydetail-refundedgiftcardvalue) by [`gift_card_id`](#paymentsdimension-propertydetail-giftcardid) when analyzing gift card payment activity.

Examples

### Examples

* ####

  ##### Description

  Chart daily \`net\_payments\` this month, split by Shop Pay and other payment methods. This example uses \[\`COMPARE TO previous\_month\`]\(/docs/api/shopifyql/latest/syntax/compare-to) to benchmark each day against the same day last month.

  ##### ShopifyQL

  ```shopifyql
  FROM payments
    SHOW gross_payments, refunded_payments, net_payments,
      net_payments_excluding_gift_cards
    GROUP BY is_shop_pay_transaction WITH TOTALS
    TIMESERIES day
    SINCE this_month UNTIL today
    COMPARE TO previous_month
    ORDER BY day ASC
  VISUALIZE net_payments TYPE line
  ```

* ####

  ##### Description

  Break down last quarter's \`net\_payments\` by payment method, card type, and wallet. This example uses \[\`WHERE\`]\(/docs/api/shopifyql/latest/syntax/where) \`transaction\_kind = 'sale'\` to exclude refunds from the totals.

  ##### ShopifyQL

  ```shopifyql
  FROM payments
    SHOW net_payments, transactions, orders_with_transactions
    WHERE transaction_kind = 'sale'
    GROUP BY payment_method, credit_card_type, digital_wallet WITH TOTALS,
      GROUP_TOTALS
    DURING last_quarter
    ORDER BY net_payments DESC
    LIMIT 50
  VISUALIZE net_payments TYPE donut
  ```

* ####

  ##### Description

  Track daily \`transaction\_amount\` from completed sales last month, alongside the value redeemed from gift cards. This example uses \[\`WHERE\`]\(/docs/api/shopifyql/latest/syntax/where) \`transaction\_kind = 'sale'\` to keep refunds and non-sale transactions out of the daily total.

  ##### ShopifyQL

  ```shopifyql
  FROM payments
    SHOW redeemed_gift_card_value, refunded_gift_card_value, transaction_amount
    WHERE transaction_kind = 'sale'
    TIMESERIES day WITH TOTALS
    DURING last_month
    ORDER BY day ASC
  VISUALIZE transaction_amount TYPE line
  ```

* ####

  ##### Description

  Track weekly \`rounded\_net\_payments\` across this quarter. This example uses \[\`TIMESERIES week\`]\(/docs/api/shopifyql/latest/syntax/timeseries) to roll daily payments up into one point per week.

  ##### ShopifyQL

  ```shopifyql
  FROM payments
    SHOW rounded_net_payments
    TIMESERIES week
    DURING this_quarter
    ORDER BY week ASC
  VISUALIZE rounded_net_payments TYPE line
  ```

***

## Metrics

Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.

Metrics you can use when querying `FROM payments`.

* **cash\_​rounding**

  **MONEY**

  Positive values mean cash payments are rounded up, and negative values mean they're rounded down, in your store's currency.

* **gross\_​payments**

  **MONEY**

  Amount of payments before any refunds

* **net\_​payments**

  **MONEY**

  Amount of payments after any refunds

* **net\_​payments\_​excluding\_​gift\_​cards**

  **MONEY**

  Amount of payments after any refunds, excluding amount redeemed from gift cards

* **orders\_​with\_​transactions**

  **INTEGER**

  Orders are included when they have a sale or capture transaction.

* **redeemed\_​gift\_​card\_​value**

  **MONEY**

  Includes successful purchases where a gift card was redeemed, in your store's currency.

* **refunded\_​gift\_​card\_​value**

  **MONEY**

  Includes successful refunds returned to gift cards, in your store's currency.

* **refunded\_​payments**

  **MONEY**

  Amount of refunded payments

* **rounded\_​net\_​payments**

  **MONEY**

  The amount of payments after refunds, with cash payments rounded to the nearest currency unit, in your store's currency. Use [`rounded_net_payments`](#paymentsmetric-propertydetail-roundednetpayments) to review payment value when cash rounding matters.

* **transaction\_​amount**

  **MONEY**

  Amount of all payment transactions

* **transactions**

  **INTEGER**

  Number of payment transactions

### MONEY

A monetary amount representing currency values such as prices, revenue, costs, and discounts.

```ts
```

### INTEGER

A whole number without decimal places, used for counts, quantities, and other discrete numeric values.

```ts
```

***

## Dimensions

Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.

Dimensions you can use when querying `FROM payments`.

* **billing\_​address\_​id**

  **IDENTITY**

  The unique Shopify identifier for the billing address. Use [`billing_address_id`](#paymentsdimension-propertydetail-billingaddressid) with [`billing_city`](#paymentsdimension-propertydetail-billingcity), [`billing_region`](#paymentsdimension-propertydetail-billingregion), or [`billing_country`](#paymentsdimension-propertydetail-billingcountry) to show location labels.

* **channel\_​id**

  **IDENTITY**

  Shopify identifier for the sales channel (multi-channel app)

* **credit\_​card\_​tier**

  **STRING**

  Values are Standard and Premium.

* **credit\_​card\_​type**

  **STRING**

  For refunds, captures, or other related payment activity, [`credit_card_type`](#paymentsdimension-propertydetail-creditcardtype) reflects the card type from the original card payment.

* **customer\_​id**

  **IDENTITY**

  The unique Shopify identifier for the customer tied to the transaction. Use [`customer_id`](#paymentsdimension-propertydetail-customerid) to break results down by customer or filter to a specific customer. Use it with [`customer_name`](#paymentsdimension-propertydetail-customername) or [`customer_email`](#paymentsdimension-propertydetail-customeremail) to show readable labels.

* **day**

  **DAY\_TIMESTAMP**

  Based on when the payment transaction happened.

* **day\_​of\_​week**

  **DAY\_OF\_WEEK**

  The day of the week a transaction happened, with values Monday through Sunday.

* **digital\_​wallet**

  **STRING**

  Digital wallet used for the transaction

* **gift\_​card\_​id**

  **IDENTITY**

  The unique Shopify identifier for the gift card used in the transaction. Use [`gift_card_id`](#paymentsdimension-propertydetail-giftcardid) to filter to payments involving a specific gift card.

* **hour**

  **HOUR\_TIMESTAMP**

  Based on when the payment transaction happened.

* **hour\_​of\_​day**

  **HOUR\_OF\_DAY**

  The hour of day a transaction happened, with values 0 through 23.

* **is\_​shop\_​channel\_​transaction**

  **BOOLEAN**

  Label specifying whether the transaction was processed through the Shop channel

* **is\_​shop\_​pay\_​transaction**

  **BOOLEAN**

  Shop Cash payments are included as Shop Pay transactions.

* **minute**

  **MINUTE\_TIMESTAMP**

  Based on when the payment transaction happened.

* **month**

  **MONTH\_TIMESTAMP**

  Based on when the payment transaction happened.

* **month\_​of\_​year**

  **MONTH\_OF\_YEAR**

  The month of the year a transaction happened, with values 1 through 12.

* **new\_​or\_​returning\_​customer**

  **STRING**

  A payment transaction tied to a customer's first order is New, and one tied to a later order is Returning.

* **order\_​id**

  **IDENTITY**

  The unique Shopify identifier for the order tied to the transaction. Use [`order_id`](#paymentsdimension-propertydetail-orderid) with [`order_name`](#paymentsdimension-propertydetail-ordername) to show the customer-facing order label.

* **payment\_​card\_​bin**

  **STRING**

  Values are BINs that identify the card-issuing bank or institution.

* **payment\_​card\_​issuer**

  **STRING**

  The issuer of the payment card used for the transaction, such as a bank or card provider.

* **payment\_​card\_​source**

  **STRING**

  Values are Credit, Debit, Prepaid, and Unknown.

* **payment\_​gateway**

  **STRING**

  Values are gateway names such as Shopify Payments, Gift Card, Shop Pay Installments, and Cash.

* **payment\_​method**

  **STRING**

  Values are payment method names such as Card, PayPal, Klarna, and Gift Card.

* **pos\_​location\_​id**

  **IDENTITY**

  The unique Shopify identifier for the physical retail location tied to the transaction. Use [`pos_location_id`](#paymentsdimension-propertydetail-poslocationid) with [`pos_location_name`](#paymentsdimension-propertydetail-poslocationname) to show readable retail location labels.

* **pos\_​location\_​name**

  **STRING**

  Name of your physical retail location

* **quarter**

  **QUARTER\_TIMESTAMP**

  Based on when the payment transaction happened.

* **second**

  **SECOND\_TIMESTAMP**

  Based on when the payment transaction happened.

* **shipping\_​address\_​id**

  **IDENTITY**

  The unique Shopify identifier for the shipping address. Use [`shipping_address_id`](#paymentsdimension-propertydetail-shippingaddressid) with [`shipping_city`](#paymentsdimension-propertydetail-shippingcity), [`shipping_region`](#paymentsdimension-propertydetail-shippingregion), or [`shipping_country`](#paymentsdimension-propertydetail-shippingcountry) to show location labels.

* **shop\_​id**

  **IDENTITY**

  The unique Shopify identifier for your store. Use [`shop_id`](#paymentsdimension-propertydetail-shopid) with [`shop_name`](#paymentsdimension-propertydetail-shopname) to show readable store labels.

* **staff\_​id**

  **IDENTITY**

  The unique Shopify identifier for the staff member associated with the transaction. Use [`staff_id`](#paymentsdimension-propertydetail-staffid) with [`staff_member_name`](#paymentsdimension-propertydetail-staffmembername) to show readable staff labels.

* **transaction\_​currency**

  **STRING**

  Currency of the transaction

* **transaction\_​id**

  **IDENTITY**

  The unique Shopify identifier for the transaction. Use [`transaction_id`](#paymentsdimension-propertydetail-transactionid) to filter to a specific payment transaction.

* **transaction\_​kind**

  **STRING**

  Transaction kinds include sale, authorization, capture, refund, etc.

* **transaction\_​number**

  **INTEGER**

  Number of the transaction

* **transaction\_​sale\_​type**

  **STRING**

  Sale type of the transaction, such as Shop App or Shop Pay

* **transaction\_​status**

  **STRING**

  Status of the transaction, such as success, pending, or failure

* **week**

  **WEEK\_TIMESTAMP**

  Based on when the payment transaction happened.

* **week\_​of\_​year**

  **WEEK\_OF\_YEAR**

  The week of the year a transaction happened, with values 1 through 53.

* **year**

  **YEAR\_TIMESTAMP**

  Based on when the payment transaction happened.

* **billing\_​city**

  **STRING**

  City of the billing address

* **billing\_​company**

  **STRING**

  B2B customer associated with the billing address

* **billing\_​country**

  **STRING**

  Country of the billing address (e.g., United States, Canada)

* **billing\_​postal\_​code**

  **STRING**

  Postal code of the billing address

* **billing\_​region**

  **STRING**

  State or province of the billing address (e.g., California, Ontario)

* **shop\_​name**

  **STRING**

  Name of your store

* **abandoned\_​checkout\_​date**

  **DAY\_TIMESTAMP**

  Date the customer most recently abandoned a cart

* **customer\_​account\_​status**

  **STRING**

  The customer's account state, with values Declined, Disabled, Enabled, and Invited.

* **customer\_​added\_​date**

  **DAY\_TIMESTAMP**

  The day the customer record was added, reported in your store's time zone.

* **customer\_​created\_​by\_​app\_​id**

  **IDENTITY**

  The Shopify identifier for the app that created the customer.

* **customer\_​email**

  **STRING**

  Email address of the customer

* **customer\_​email\_​domain**

  **STRING**

  The part of the customer's email address after the @ symbol, such as gmail.com or your company's domain.

* **customer\_​language**

  **STRING**

  Language associated with the customer

* **customer\_​name**

  **STRING**

  Full name of the customer

* **customer\_​email\_​subscription\_​status**

  **STRING**

  The customer's email marketing subscription state, with values such as Invalid, Not subscribed, Pending, and Subscribed.

* **customer\_​cities**

  **ARRAY\<STRING>**

  All cities in the customer's history of addresses

* **customer\_​countries**

  **ARRAY\<STRING>**

  All countries from the customer's address history. Values are country codes such as US, CA, GB, and AU.

* **customer\_​regions**

  **ARRAY\<STRING>**

  All states or provinces from the customer's address history. Values are region codes such as US-CA, US-NY, CA-ON, and GB-ENG.

* **customer\_​amount\_​spent**

  **MONEY**

  The customer's all-time spend is shown in your store's currency.

* **customer\_​last\_​order\_​date**

  **DAY\_TIMESTAMP**

  The day the customer most recently placed an order, reported in your store's time zone.

* **customer\_​number\_​of\_​orders**

  **INTEGER**

  Number of orders the customer has placed across all time

* **first\_​order\_​sales\_​channel**

  **STRING**

  The sales channel where the customer's first order was placed, shown as a channel name such as Online Store or POS.

* **customer\_​cohort\_​month**

  **MONTH\_TIMESTAMP**

  The month of the customer's first order, reported in your store's time zone.

* **customer\_​cohort\_​quarter**

  **QUARTER\_TIMESTAMP**

  The quarter of the customer's first order, reported in your store's time zone.

* **customer\_​cohort\_​week**

  **WEEK\_TIMESTAMP**

  The week of the customer's first order, reported in your store's time zone.

* **customer\_​first\_​order\_​date**

  **DAY\_TIMESTAMP**

  The day the customer placed their first order, reported in your store's time zone.

* **first\_​order\_​referring\_​channel**

  **STRING**

  Referring channel associated with the customer's first order

* **first\_​order\_​traffic\_​type**

  **STRING**

  Type of traffic associated with the customer's first order

* **first\_​order\_​has\_​subscription**

  **BOOLEAN**

  Whether the customer's first order included a subscription purchase, with values `true` and `false`.

* **first\_​order\_​products**

  **ARRAY\<STRING>**

  Products bought together in the customer's first order

* **predicted\_​spend\_​tier**

  **STRING**

  The customer's predicted spend tier for the next year, with values Low, Medium, and High.

* **customer\_​sms\_​subscription\_​status**

  **STRING**

  The customer's SMS marketing subscription state, with values such as Not subscribed, Pending, Redacted, and Subscribed.

* **customer\_​tag**

  **STRING**

  Tag associated with the customer

* **customer\_​tags**

  **ARRAY\<STRING>**

  Set of tags associated with the customer

* **rfm\_​group**

  **STRING**

  A customer relationship label based on recency, frequency, and monetary spend. Values include Champions, Loyal, Needs attention, and At risk.

* **is\_​b2b\_​order**

  **BOOLEAN**

  Whether the order is a B2B order, with values `true` and `false`.

* **is\_​canceled\_​order**

  **BOOLEAN**

  Whether the order is canceled, with values `true` and `false`.

* **order\_​checkout\_​currency**

  **STRING**

  The currency the buyer saw at checkout when placing the order. Values are currency codes such as USD, CAD, EUR, and GBP.

* **order\_​fulfillment\_​status**

  **STRING**

  The order's fulfillment state, with values Fulfilled, Partial, Restocked, and Unfulfilled.

* **order\_​includes\_​duties**

  **BOOLEAN**

  Whether the order includes duties, with values `true` and `false`.

* **order\_​name**

  **STRING**

  The name or number of the order as the customer sees it.

* **order\_​payment\_​status**

  **STRING**

  The order's payment state, such as Authorized, Paid, Partially refunded, or Pending.

* **order\_​sales\_​channel**

  **STRING**

  The sales channel where the order was placed, shown as a channel name such as Online Store or POS.

* **order\_​sales\_​channel\_​id**

  **IDENTITY**

  The unique Shopify identifier for the order's sales channel. Use [`order_sales_channel_id`](#paymentsdimension-propertydetail-ordersaleschannelid) with [`order_sales_channel`](#paymentsdimension-propertydetail-ordersaleschannel) to show readable channel labels.

* **is\_​shop\_​referral\_​order**

  **BOOLEAN**

  Whether the order was referred from the Shop app or shop.app, with values `true` and `false`.

* **order\_​landing\_​page\_​path**

  **STRING**

  Path of the first page of the user session that resulted in the order

* **order\_​landing\_​page\_​url**

  **STRING**

  First page of the user session that resulted in the order

* **order\_​marketing\_​event\_​id**

  **IDENTITY**

  Shopify identifier for the marketing event associated with the order

* **order\_​referrer\_​domain**

  **STRING**

  Domain of the site that led to the order

* **order\_​referrer\_​name**

  **STRING**

  The readable name of the site that led to the order.

* **order\_​referrer\_​path**

  **STRING**

  Path of the site that led to the order

* **order\_​referrer\_​site**

  **STRING**

  Site that led to the order

* **order\_​referrer\_​source**

  **STRING**

  The referrer type that led to the order, such as organic or email.

* **order\_​referrer\_​url**

  **STRING**

  External page that referred a customer and led to the order

* **order\_​utm\_​campaign**

  **STRING**

  UTM name of the campaign associated with the order

* **order\_​utm\_​content**

  **STRING**

  The UTM content value associated with the order, often used to distinguish ads, links, or content variations.

* **order\_​utm\_​medium**

  **STRING**

  The UTM medium associated with the order, such as email, social, or paid search.

* **order\_​utm\_​source**

  **STRING**

  The UTM source associated with the order, such as Google, Facebook, or a newsletter.

* **order\_​utm\_​term**

  **STRING**

  The UTM term associated with the order, often used for paid search keywords or other tracked terms.

* **number\_​of\_​products\_​bought\_​together**

  **INTEGER**

  Total unique products in the same order

* **number\_​of\_​variants\_​bought\_​together**

  **INTEGER**

  The number of unique product variants in the same order, with each SKU counted a single time.

* **products\_​bought\_​together**

  **ARRAY\<STRING>**

  The product names that appear in the same order.

* **products\_​bought\_​together\_​ids**

  **ARRAY\<INTEGER>**

  The Shopify product identifiers for products in the same order.

* **variants\_​bought\_​together**

  **ARRAY\<STRING>**

  The product variant labels that appear in the same order, such as size, color, or style combinations.

* **company\_​id**

  **IDENTITY**

  The unique Shopify identifier for the company. Use [`company_id`](#paymentsdimension-propertydetail-companyid) with [`company_name`](#paymentsdimension-propertydetail-companyname) to show readable company labels.

* **company\_​name**

  **STRING**

  Name of the company that placed the order

* **company\_​location\_​id**

  **IDENTITY**

  The unique Shopify identifier for the company location. Use [`company_location_id`](#paymentsdimension-propertydetail-companylocationid) with [`company_location_name`](#paymentsdimension-propertydetail-companylocationname) to show readable company location labels.

* **company\_​location\_​name**

  **STRING**

  The company location or branch that placed the order

* **referring\_​channel**

  **STRING**

  Marketing channel that referred the customer to place the order

* **referring\_​medium**

  **STRING**

  The marketing medium that referred the customer to place the order, such as email, social, or search.

* **referring\_​platform**

  **STRING**

  The marketing platform that referred the customer to place the order, such as Google, Facebook, or Instagram.

* **traffic\_​type**

  **STRING**

  The type of traffic that led to the order, such as organic, paid, or direct.

* **order\_​marketing\_​event\_​target**

  **STRING**

  The platform or channel where the marketing activity was deployed, such as Email, Facebook, Google, or Instagram.

* **order\_​marketing\_​event\_​type**

  **STRING**

  The type of marketing activity that led to the order, such as Ad, Affiliate, Newsletter, or Retargeting. PLA means Product Listing Ads, and SEO means Search Engine Optimization.

* **market**

  **STRING**

  Market you've defined in Shopify, like a geographical market or customer group

* **markets**

  **ARRAY\<STRING>**

  Markets or customer segments associated with the order

* **order\_​cancellation\_​reason**

  **STRING**

  The reason specified for the order cancellation, such as Customer, Other, Fraud, or Inventory.

* **order\_​risk\_​level**

  **STRING**

  The fraud risk level Shopify assigned to the order, with values Low, Medium, High, None, and Pending.

* **order\_​is\_​shopify\_​protect\_​covered**

  **BOOLEAN**

  Whether the order has met Shopify Protect fulfillment requirements, including proper shipping and tracking, with values `true` and `false`.

* **order\_​is\_​shopify\_​protect\_​eligible**

  **BOOLEAN**

  Whether the order qualifies for Shopify Protect, with values `true` and `false`.

* **order\_​is\_​shopify\_​protect\_​protected**

  **BOOLEAN**

  Whether the order has full Shopify Protect coverage against fraud, with values `true` and `false`.

* **order\_​tag**

  **STRING**

  Tag associated with the order

* **order\_​tags**

  **ARRAY\<STRING>**

  Set of tags associated with the order

* **agentic\_​referring\_​channel**

  **STRING**

  The AI agent or assistant that referred the session to your online store, with values ChatGPT, Google AI Mode and Gemini, Microsoft Copilot, and Shop.

* **channel\_​handle**

  **STRING**

  Name of the marketing channel or platform that drove the marketing engagement

* **marketing\_​activity\_​id**

  **IDENTITY**

  The unique Shopify identifier for the marketing activity. Use [`marketing_activity_id`](#paymentsdimension-propertydetail-marketingactivityid) with [`marketing_activity_title`](#paymentsdimension-propertydetail-marketingactivitytitle) to show readable activity labels.

* **marketing\_​activity\_​status**

  **STRING**

  Current status of the marketing activity (such as Active or Paused)

* **marketing\_​activity\_​title**

  **STRING**

  Name of the marketing activity

* **marketing\_​activity\_​url\_​parameter\_​key**

  **STRING**

  URL parameter key for the marketing activity

* **marketing\_​activity\_​url\_​parameter\_​value**

  **STRING**

  URL parameter value for the marketing activity

* **marketing\_​automation\_​id**

  **IDENTITY**

  Unique ID that Shopify uses to identify the marketing automation

* **marketing\_​delivery\_​channel**

  **STRING**

  Channel through which the marketing activity is delivered

* **marketing\_​event\_​id**

  **IDENTITY**

  Unique identifier for the associated marketing event

* **marketing\_​platform**

  **STRING**

  The marketing platform that created the marketing activity, shown as a platform name.

* **page\_​host**

  **STRING**

  The host name of the session landing page.

* **page\_​path**

  **STRING**

  The path of the session landing page.

* **page\_​url**

  **STRING**

  The URL of the first page viewed in the session.

* **referrer\_​url**

  **STRING**

  External page that led to an online store session

* **utm\_​campaign**

  **STRING**

  UTM name of the campaign associated with the session

* **utm\_​content**

  **STRING**

  The UTM content value associated with the session, often used to distinguish ads, links, or content variations.

* **utm\_​medium**

  **STRING**

  The UTM medium associated with the session, such as email, social, or paid search.

* **utm\_​source**

  **STRING**

  The UTM source associated with the session, such as Google, Facebook, or a newsletter.

* **utm\_​term**

  **STRING**

  The UTM term associated with the session, often used for paid search keywords or other tracked terms.

* **pos\_​register\_​id**

  **IDENTITY**

  Identifier for the register at your physical retail location

* **shipping\_​city**

  **STRING**

  City of the shipping address

* **shipping\_​company**

  **STRING**

  Company of the shipping address

* **shipping\_​country**

  **STRING**

  Country of the shipping address (e.g., United States, Canada)

* **shipping\_​postal\_​code**

  **STRING**

  Postal code of the shipping address

* **shipping\_​region**

  **STRING**

  State or province of the shipping address (e.g., California, Ontario)

* **staff\_​member\_​name**

  **STRING**

  Name of the staff member associated with the order

### IDENTITY

A unique identifier for a Shopify resource such as a customer, product, or order.

```ts
```

### STRING

A sequence of characters representing text data.

```ts
```

### DAY\_TIMESTAMP

A date value truncated to day precision.

```ts
```

### DAY\_OF\_WEEK

A day within a week, used for weekday-based grouping and filtering.

```ts
```

### HOUR\_TIMESTAMP

A timestamp truncated to hour precision.

```ts
```

### HOUR\_OF\_DAY

An hour within a day, typically represented as an integer from 0 to 23.

```ts
```

### BOOLEAN

A true or false value representing binary states.

```ts
```

### MINUTE\_TIMESTAMP

A timestamp truncated to minute precision.

```ts
```

### MONTH\_TIMESTAMP

A date value representing the start of a month.

```ts
```

### MONTH\_OF\_YEAR

A month number within a year.

```ts
```

### QUARTER\_TIMESTAMP

A date value representing the start of a fiscal quarter.

```ts
```

### SECOND\_TIMESTAMP

A timestamp truncated to second precision.

```ts
```

### WEEK\_TIMESTAMP

A date value representing the start of a week.

```ts
```

### WEEK\_OF\_YEAR

A week number within a year.

```ts
```

### YEAR\_TIMESTAMP

A date value representing the start of a year.

```ts
```

### ARRAY

A list of values. The element type appears inside angle brackets, such as ARRAY\<STRING>.

```ts
```

***

## MATCHES expressions

Use these expressions inside a [`MATCHES`](https://shopify.dev/docs/api/shopifyql/latest/syntax/where#matches) filter to keep `payments` rows that have at least one related record matching the parameters. Each parameter filters on a dimension or metric of the related records.

* **customer.​orders\_​placed**

  **PaymentsCustomerOrdersPlacedConditions**

  Orders the customer placed, filterable by order date, source app, location, order count, and spend.

* **customer.​products\_​purchased**

  **PaymentsCustomerProductsPurchasedConditions**

  Products the customer bought, filterable by product ID, purchase date, quantity per order, and total quantity.

* **customer.​shopify\_​email.​bounced**

  **PaymentsCustomerShopifyEmailBouncedConditions**

  Emails that bounced for the customer, filterable by marketing activity, bounce date, and bounce count.

* **customer.​shopify\_​email.​clicked**

  **PaymentsCustomerShopifyEmailClickedConditions**

  Emails the customer clicked, filterable by marketing activity, click date, and click count.

* **customer.​shopify\_​email.​delivered**

  **PaymentsCustomerShopifyEmailDeliveredConditions**

  Emails delivered to the customer, filterable by marketing activity, delivery date, and delivery count.

* **customer.​shopify\_​email.​marked\_​as\_​spam**

  **PaymentsCustomerShopifyEmailMarkedAsSpamConditions**

  Emails the customer marked as spam, filterable by marketing activity, spam-report date, and spam-report count.

* **customer.​shopify\_​email.​opened**

  **PaymentsCustomerShopifyEmailOpenedConditions**

  Emails the customer opened, filterable by marketing activity, open date, and open count.

* **customer.​shopify\_​email.​unsubscribed**

  **PaymentsCustomerShopifyEmailUnsubscribedConditions**

  Email unsubscribe events for the customer, filterable by marketing activity, unsubscribe date, and unsubscribe count.

* **customer.​store\_​credit\_​accounts**

  **PaymentsCustomerStoreCreditAccountsConditions**

  Store credit accounts for the customer, filterable by balance, currency, expiry date, and most recent credit date.

* **customer.​storefront\_​event.​collection\_​viewed**

  **PaymentsCustomerStorefrontEventCollectionViewedConditions**

  Collection pages the customer viewed, filterable by collection ID, view date, and view count.

* **customer.​storefront\_​event.​product\_​viewed**

  **PaymentsCustomerStorefrontEventProductViewedConditions**

  Product pages the customer viewed, filterable by product ID, view date, and view count.

* **customer.​within\_​distance**

  **PaymentsCustomerWithinDistanceConditions**

  Customers with an address within a distance of a location, filterable by coordinates and radius.

### PaymentsCustomerOrdersPlacedConditions

Fields you can use inside \`customer.orders\_placed MATCHES (...)\` when querying \`FROM payments\`.

* amount

  Filter. Amount spent per order.

  ```ts
  MONEY
  ```

* app\_id

  Filter. App ID associated with the order.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date the order was placed.

  ```ts
  TIMESTAMP
  ```

* location\_id

  Filter. Location ID associated with the order.

  ```ts
  IDENTITY
  ```

* count

  Metric. Number of orders placed.

  ```ts
  INTEGER
  ```

* sum\_amount

  Metric. Amount spent in the date range.

  ```ts
  MONEY
  ```

### TIMESTAMP

A full-precision timestamp including date and time.

```ts
```

### PaymentsCustomerProductsPurchasedConditions

Fields you can use inside \`customer.products\_purchased MATCHES (...)\` when querying \`FROM payments\`.

* date

  Filter. Date the product(s) were purchased.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Product IDs.

  ```ts
  IDENTITY
  ```

* quantity

  Filter. Number purchased per order.

  ```ts
  INTEGER
  ```

* sum\_quantity

  Metric. Number purchased within the date range.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailBouncedConditions

Fields you can use inside \`customer.shopify\_email.bounced MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was bounced.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was bounced.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailClickedConditions

Fields you can use inside \`customer.shopify\_email.clicked MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was clicked.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was clicked.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailDeliveredConditions

Fields you can use inside \`customer.shopify\_email.delivered MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was delivered.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was delivered.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailMarkedAsSpamConditions

Fields you can use inside \`customer.shopify\_email.marked\_as\_spam MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was marked as spam.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was marked as spam.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailOpenedConditions

Fields you can use inside \`customer.shopify\_email.opened MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was opened.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was opened.

  ```ts
  INTEGER
  ```

### PaymentsCustomerShopifyEmailUnsubscribedConditions

Fields you can use inside \`customer.shopify\_email.unsubscribed MATCHES (...)\` when querying \`FROM payments\`.

* activity\_id

  Filter. Marketing activity ID of the email campaign.

  ```ts
  IDENTITY
  ```

* date

  Filter. Date on which the email was unsubscribed.

  ```ts
  TIMESTAMP
  ```

* count

  Metric. Exact number of times an email was unsubscribed.

  ```ts
  INTEGER
  ```

### PaymentsCustomerStoreCreditAccountsConditions

Fields you can use inside \`customer.store\_credit\_accounts MATCHES (...)\` when querying \`FROM payments\`.

* balance

  Filter. Amount available to spend.

  ```ts
  FLOAT
  ```

* currency

  Filter. Currency associated with the account.

  ```ts
  STRING
  ```

* last\_credit\_date

  Filter. Date when credits were last added.

  ```ts
  TIMESTAMP
  ```

* next\_expiry\_date

  Filter. Date when credits expire.

  ```ts
  TIMESTAMP
  ```

### FLOAT

A floating-point number used for measurements, rates, and other continuous numeric values.

```ts
```

### PaymentsCustomerStorefrontEventCollectionViewedConditions

Fields you can use inside \`customer.storefront\_event.collection\_viewed MATCHES (...)\` when querying \`FROM payments\`.

* date

  Filter. Date collection was viewed.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Collection ID.

  ```ts
  IDENTITY
  ```

* count

  Metric. Times collection was viewed.

  ```ts
  INTEGER
  ```

### PaymentsCustomerStorefrontEventProductViewedConditions

Fields you can use inside \`customer.storefront\_event.product\_viewed MATCHES (...)\` when querying \`FROM payments\`.

* date

  Filter. Date product was viewed.

  ```ts
  TIMESTAMP
  ```

* id

  Filter. Product ID.

  ```ts
  IDENTITY
  ```

* count

  Metric. Times product was viewed.

  ```ts
  INTEGER
  ```

### PaymentsCustomerWithinDistanceConditions

Fields you can use inside \`customer.within\_distance MATCHES (...)\` when querying \`FROM payments\`.

* coordinates

  Filter. Latitude and longitude of location. Required.

  ```ts
  GEO_COORDINATE
  ```

* distance\_km

  Filter. Maximum distance from location, in kilometers. Required: provide one of the \`distance\_km/mi\` group.

  ```ts
  FLOAT
  ```

* distance\_mi

  Filter. Maximum distance from location, in miles. Required: provide one of the \`distance\_km/mi\` group.

  ```ts
  FLOAT
  ```

### GEO\_COORDINATE

A geographic coordinate value.

```ts
```

***

## Related schemas

* [`payouts`](https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/payouts): Bank deposit data downstream of these transactions.
* [`fees`](https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/fees): Processing and FX costs charged on each transaction.
* [`payment_attempts`](https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/payment_attempts): Authorization rate and failure analysis upstream of successful transactions.
* [`chargebacks`](https://shopify.dev/docs/api/shopifyql/latest/schemas/finance_and_payments/chargebacks): Disputed transactions when you want to size fraud losses.

***
