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

# Payment Card Spending

> Crypto card spend, refunds and cashback per card program, chain and token: spend count and spend in USD split into credit and debit, spenders, median spend, and spend and count by transaction size bracket. Each series is one card program token, keyed by protocol, chain, card program and token.

One row per payment card spending, keyed by protocol, chain, card program and token: the parent protocol and product, chain, token and the mapped protocol, project and network records. The id is the series key of the payment-card-spending timeseries model.

| | |
| - | - |
| Access | Lending-protocols-dataset |
| Tabular model | `payment-card-spending`: primary key `id` |
| Timeseries model | `payment-card-spending`: intervals `1d`, series key `id` (Payment Card Spending ID), series must be named (up to 10 per call) |

## Endpoints

> [card] [List Payment Card Spending](https://docs.blockworks.com/api-reference/data-api/payment-cards/tabular-payment-card-spending.md)
>
> One page of rows with per-column filters, sorting and pagination.

> [card] [Batch Get Payment Card Spending timeseries](https://docs.blockworks.com/api-reference/data-api/payment-cards/timeseries-payment-card-spending.md)
>
> Up to 10 series in one request, named by Payment Card Spending ID in `series`.

> [card] [Get Payment Card Spending timeseries](https://docs.blockworks.com/api-reference/data-api/payment-cards/timeseries-payment-card-spending-by-id.md)
>
> One series over a time window, keyed by its Payment Card Spending ID.

## Metrics

29 metrics. Use the `Field` value in `selections`; every point starts with the timestamp and continues in this order.

| Field | Name | Type | Unit | Description |
| - | - | - | - | - |
| `spendCount` | Spend Count | float64 | | Spend count, in the program settlement unit. |
| `spendCountCredit` | Credit Spend Count | float64 | | Credit spend count. |
| `spendCountDebit` | Debit Spend Count | float64 | | Debit spend count. |
| `spendUSD` | Spend (USD) | float64 | | Card spend in USD. |
| `spendCreditUSD` | Credit Spend (USD) | float64 | | Credit card spend in USD. |
| `spendDebitUSD` | Debit Spend (USD) | float64 | | Debit card spend in USD. |
| `refundCount` | Refund Count | float64 | | Refund count. |
| `refundUSD` | Refunds (USD) | float64 | | Refunds in USD. |
| `cashbackUSD` | Cashback (USD) | float64 | | Cashback paid in USD. |
| `spenders` | Spenders | float64 | | Distinct spenders. |
| `medianSpendUSD` | Median Spend (USD) | float64 | | Median spend in USD. |
| `spend0To10USD` | Spend $0 to $10 (USD) | float64 | | Spend in USD in the $0 to $10 bracket. |
| `spend10To25USD` | Spend $10 to $25 (USD) | float64 | | Spend in USD in the $10 to $25 bracket. |
| `spend25To50USD` | Spend $25 to $50 (USD) | float64 | | Spend in USD in the $25 to $50 bracket. |
| `spend50To100USD` | Spend $50 to $100 (USD) | float64 | | Spend in USD in the $50 to $100 bracket. |
| `spend100To250USD` | Spend $100 to $250 (USD) | float64 | | Spend in USD in the $100 to $250 bracket. |
| `spend250To500USD` | Spend $250 to $500 (USD) | float64 | | Spend in USD in the $250 to $500 bracket. |
| `spend500To1000USD` | Spend $500 to $1,000 (USD) | float64 | | Spend in USD in the $500 to $1,000 bracket. |
| `spend1000To5000USD` | Spend $1,000 to $5,000 (USD) | float64 | | Spend in USD in the $1,000 to $5,000 bracket. |
| `spend5000PlusUSD` | Spend \$5,000 and Over (USD) | float64 | | Spend in USD in the \$5,000 and over bracket. |
| `spendCount0To10` | Spend Count $0 to $10 | float64 | | Spend count in the $0 to $10 bracket. |
| `spendCount10To25` | Spend Count $10 to $25 | float64 | | Spend count in the $10 to $25 bracket. |
| `spendCount25To50` | Spend Count $25 to $50 | float64 | | Spend count in the $25 to $50 bracket. |
| `spendCount50To100` | Spend Count $50 to $100 | float64 | | Spend count in the $50 to $100 bracket. |
| `spendCount100To250` | Spend Count $100 to $250 | float64 | | Spend count in the $100 to $250 bracket. |
| `spendCount250To500` | Spend Count $250 to $500 | float64 | | Spend count in the $250 to $500 bracket. |
| `spendCount500To1000` | Spend Count $500 to $1,000 | float64 | | Spend count in the $500 to $1,000 bracket. |
| `spendCount1000To5000` | Spend Count $1,000 to $5,000 | float64 | | Spend count in the $1,000 to $5,000 bracket. |
| `spendCount5000Plus` | Spend Count \$5,000 and Over | float64 | | Spend count in the \$5,000 and over bracket. |

## Columns

Use the `Field` value in `selections`, `sortBy`, and as the base of a filter parameter (`Field` plus one of its `Filters` suffixes).

| Field | Type | Filters | Sort | Description |
| - | - | - | - | - |
| `id` | string | `Eq`, `IsOneOf` | | The series key of the payment-card-spending timeseries model, the parent slug, chain, program id and token address, joined with underscores. (primary key) |
| `name` | string | `Eq`, `IsOneOf`, `Contains` | default | The display name of the series, the card program name and token symbol. |
| `slug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's project slug, the slug used for the same protocol across the API. |
| `parentSlug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's short name. |
| `productSlug` | string | `Eq`, `IsOneOf` | | The product or version within the parent protocol. |
| `chain` | string | `Eq`, `IsOneOf` | | The short name of the chain (ethereum, base, solana). |
| `programID` | string | `Eq`, `IsOneOf` | | The card program's identifier. |
| `tokenAddress` | string | `Eq`, `IsOneOf` | | The token contract address (the mint address on Solana); null when unlabeled. |
| `programName` | string | `Eq`, `IsOneOf`, `Contains` | | The card program's display name (for example ether.fi Cash). |
| `tokenSymbol` | string | `Eq`, `IsOneOf`, `Contains` | yes | The token's ticker symbol. |
| `protocolSlug` | string | `Eq`, `IsOneOf` | | The slug of the protocol record mapped to the product; null when unmapped. |
| `protocolName` | string | `Eq`, `IsOneOf` | | The name of the protocol record mapped to the product; null when unmapped. |
| `projectID` | string | `Eq`, `IsOneOf` | | The identifier of the parent protocol's project record; null when unmapped. |
| `networkID` | string | `Eq`, `IsOneOf` | | The chain's networkID in the blockchains model; null when unmapped. |

## Example

```bash curl theme={null}
curl "https://api.blockworks.com/query/timeseries/payment-card-spending/1d/<id>?timeframe=7d&selections=spendCount,spendCountCredit" \
  -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
```

See [Get Payment Card Spending timeseries](https://docs.blockworks.com/api-reference/data-api/payment-cards/timeseries-payment-card-spending-by-id.md) for the response and the errors.


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