# paymentMethods

```graphql
query PaymentMethods {
  paymentMethods {
    data {
      id
      brand
      last4
      expMonth
      expYear
      isDefault
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the cards saved for an account and which one is the default; returns one page of payment methods, which are changed in the billing portal. Requires account.billing.read.

## Arguments

| Name           | Type                   | Required | Description                                                              |
| -------------- | ---------------------- | -------- | ------------------------------------------------------------------------ |
| `input`        | PaymentMethodListInput |          |                                                                          |
| `input.limit`  | Int                    |          | Maximum number of payment methods to return, 1 to 100. Defaults to 100.  |
| `input.cursor` | String                 |          | Opaque cursor pointing at the next page. Omit it to read the first page. |

## Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 200    | The PaymentMethodPage! in data.paymentMethods. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query PaymentMethods {\n  paymentMethods {\n    data {\n      id\n      brand\n      last4\n      expMonth\n      expYear\n      isDefault\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}"
}'
```

## Example response

```json
{
  "data": {
    "paymentMethods": {
      "data": [
        {
          "id": "string",
          "brand": "string",
          "last4": "string",
          "expMonth": 0,
          "expYear": 0,
          "isDefault": false
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
