# Get gateway's saved payment method count

`GET https://app.shuttleglobal.com/c/api/instances/{instance_key}/gateways/{gateway_id}/payment_method_count`

Get the approximate number of saved payment methods on a gateway.

Note: The number is accurate as of the "updated" date, however a cached value will be returned if more than 100 in total.
The duration of the cache scales with the number of saved payment methods, values over 10k will only be updated monthly.

## Authentication

- basicAuth: Basic Authentication using secret key
- bearerAuth: OAuth 2.0 Bearer Token Authentication

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `gateway_id` | path | string | yes | The gateway's ID (`gw_...`), or its `code`. |

## Responses

### 200: Payment method count details

```json
{
  "gateway": "string",
  "total": 0,
  "by_status": {
    "ACTIVE": 0,
    "FAILING": 0
  },
  "updated": "2026-01-01T12:00:00Z"
}
```

### 400: Bad request - invalid parameters

```json
{
  "code": "string",
  "message": "string"
}
```

### 401: Unauthorized - invalid credentials

```json
{
  "code": "UNAUTHORIZED",
  "message": "Unauthorised"
}
```

### 404: Gateway not found

```json
{
  "code": "string",
  "message": "string"
}
```

## Example request

```sh
curl --request GET \
  --url https://app.shuttleglobal.com/c/api/instances/YOUR_INSTANCE_KEY/gateways/GATEWAY_ID/payment_method_count \
  --header 'Authorization: Basic <base64 of SECRET_KEY:>'
```

Reference page: https://docs.shuttleglobal.com/platforms/reference/operations/getgatewaypaymentmethodcount/