> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments

> Every payment and refund on the day it was processed: gross, refunded and net payments, gift card redemptions and payment fees, by gateway, method, card and location.

Every payment and refund on the day it was processed: gross, refunded and net payments, gift card redemptions and payment fees, by gateway, method, card and location.

## Example

```sql theme={null}
FROM payments
  SHOW gross_payments, refunded_payments
  GROUP BY sales_channel
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY gross_payments DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `gross_payments` | Currency | Payments taken (sales and captures), before refunds. |
| `refunded_payments` | Currency | Payments refunded, as a negative amount. |
| `net_payments` | Currency | Payments taken minus payments refunded. |
| `net_payments_excluding_gift_cards` | Currency | Net payments, leaving out what was paid with gift cards. |
| `transactions` | Number | Successful sales, captures and refunds. |
| `orders_with_transactions` | Number | Orders with a payment taken in the period. |
| `redeemed_gift_card_value` | Currency | What customers paid with gift cards, as a negative amount (taken off the cards), as Shopify reports it. |
| `refunded_gift_card_value` | Currency | Refunds put back on gift cards. |
| `payment_fees` | Currency | Shopify Payments fees on the transactions. |
| `fees_rate` | Percent | Payment fees as a share of gross payments: what taking payments costs. |
| `net_payments_after_fees` | Currency | Net payments minus payment fees: what reaches you. |

## Dimensions

| Dimension | Description |
| - | - |
| `payment_gateway` | The gateway that took the payment, such as shopify\_payments, paypal, gift\_card or manual. |
| `payment_method` | How the customer paid, as ShopifyQL names it: card, or their wallet. Empty for gift cards and manual payments. |
| `payment_currency` | The currency the customer paid in. |
| `manual_payment` | Whether the payment was recorded by hand, such as cash or a bank transfer: true or false. |
| `transaction_kind` | sale, authorization, capture, refund, void or change. |
| `transaction_status` | The transaction's status. Payments are successful transactions only, as in Shopify: failed attempts are on payment\_attempts. |
| `transaction_id` | The transaction's ID. |
| `credit_card_tier` | The card's tier, such as Consumer or Commercial, where Shopify Payments knows it. |
| `billing_country` | The country of the card's billing address, where Shopify Payments knows it. |
| `gift_card_id` | The gift card the payment was made with. |
| `transaction_sale_type` | The kind of sale the Shop app took the payment for. |
| `is_shop_pay_transaction` | Whether the payment was made with Shop Pay: true or false. |
| `is_shop_channel_transaction` | Whether the payment came through the Shop app: true or false. |
| `credit_card_type` | The card's brand as ShopifyQL names it, such as visa or master. |
| `digital_wallet` | The wallet used, such as APPLE\_PAY or GOOGLE\_PAY. |
| `pos_location_name` | The retail location that took the payment. |
| `sales_channel` | The sales channel the order came through, such as Online Store or Point of Sale. |
| `order_sales_channel` | The sales channel the order came through, such as Online Store or Point of Sale. |
| `order_name` | Order name, such as #1001. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `payment_method` | Text | How the customer paid, as ShopifyQL names it: card, or their wallet. Empty for gift cards and manual payments. |
| `manual_payment` | Text | Whether the payment was recorded by hand, such as cash or a bank transfer: true or false. |
| `transaction_kind` | Text | sale, authorization, capture, refund, void or change. |
| `transaction_status` | Text | The transaction's status. Payments are successful transactions only, as in Shopify: failed attempts are on payment\_attempts. |
| `transaction_id` | Text | The transaction's ID. |
| `credit_card_tier` | Text | The card's tier, such as Consumer or Commercial, where Shopify Payments knows it. |
| `billing_country` | Text | The country of the card's billing address, where Shopify Payments knows it. |
| `gift_card_id` | Text | The gift card the payment was made with. |
| `transaction_sale_type` | Text | The kind of sale the Shop app took the payment for. |
| `is_shop_pay_transaction` | Yes or no | Whether the payment was made with Shop Pay: true or false. |
| `is_shop_channel_transaction` | Yes or no | Whether the payment came through the Shop app: true or false. |
| `digital_wallet` | Text | The wallet used, such as APPLE\_PAY or GOOGLE\_PAY. |
| `pos_location_name` | Text | The retail location that took the payment. |
| `order_sales_channel` | Text | The sales channel the order came through, such as Online Store or Point of Sale. |
| `payment_gateway` | Text | The payment's gateway. |
| `payment_currency` | Text | The currency the customer paid in. |
| `credit_card_type` | Text | The card's brand. |
| `sales_channel` | Text | The order's sales channel. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `order.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Location |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Payouts](https://docs.queryful.app/queryfulql/datasets/payouts.md)
* [Payout transactions](https://docs.queryful.app/queryfulql/datasets/balance_transactions.md)
* [Disputes](https://docs.queryful.app/queryfulql/datasets/disputes.md)
* [Chargebacks](https://docs.queryful.app/queryfulql/datasets/chargebacks.md)
* [Gift cards](https://docs.queryful.app/queryfulql/datasets/gift_cards.md)
* [Store credit transactions](https://docs.queryful.app/queryfulql/datasets/store_credit_transactions.md)
* [Store credit balance](https://docs.queryful.app/queryfulql/datasets/store_credit_summaries.md)
* [Payment attempts](https://docs.queryful.app/queryfulql/datasets/payment_attempts.md)
* [Receivables](https://docs.queryful.app/queryfulql/datasets/receivables.md)
* [Payments balance](https://docs.queryful.app/queryfulql/datasets/payments_balance.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.