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

# BIN Continuity API Testing

<Warning>
  The BIN Continuity API is coming soon.
</Warning>

Ensure your integration with the BIN Continuity API works correctly by making calls to our simulator in Test Mode.

## Step 1: Create a Pagos Account or Sign In

If you're interested in the BIN Continuity API, you can try it out in [Test Mode](/getting-started/managing-your-pagos-account#test-mode).

[Sign up](https://secure.pagos.ai/sign-up) for a Pagos account or log into your existing account, then click the environment toggle in the top-right corner; a yellow bar will appear across the top of the Pagos Service Panel to confirm you're in Test Mode.

## Step 2: Generate Your Test Mode API Keys

In Test Mode, generate an API Key for the BIN Continuity API.

<Note>
  These API Keys are universal across Test Mode and will be used for testing all Pagos API products. If you've already created an API key in Test Mode, you don't need to create a new one.
</Note>

To generate your API key:

<Steps>
  <Step>
    Click your **settings** icon in the top-right corner of your Pagos Service Panel.
  </Step>

  <Step>
    Under **Developers**, click **API Keys**.
  </Step>

  <Step>
    In the **API Keys** tab, click **Create API Key** to add a new key to your account.
  </Step>

  <Step>
    In the side panel that opens, set your **Key Name**, then click **Create API Key**.
  </Step>

  <Step>
    Copy your new API Key and store it somewhere secure.

    <Warning>
      This is the only time you can view this key!
    </Warning>
  </Step>

  <Step>
    Click **I've Copied My Keys** to confirm and exit the side panel.
  </Step>
</Steps>

## Step 3: Test Looking up BIN Continuity

Use our [test BIN ranges](#test-ranges) to test looking up BIN continuity in Test Mode. Note that the endpoint for Test Mode points to **sandbox**.

### Active BIN Example

```bash theme={null}
curl --request GET \
  --url 'https://parrot.sandbox.pagosapi.com/bins/continuity?bin=485427' \
  --header 'Authorization: Bearer <api_key>'
```

This will return the mock continuity details for an active BIN:

```json theme={null}
{
  "continuity": {
    "bin": "485427",
    "bin_min": "4854270000000000000",
    "bin_max": "4854279999999999999",
    "status": "active",
    "first_seen_at": "2020-01-15T00:00:00Z",
    "last_seen_at": "2024-12-10T00:00:00Z",
    "flagged_for_delete_at": null,
    "deleted_at": null,
    "days_active": 1791,
    "file_appearances": 256,
    "card": {
      "number": {
        "length": 16
      },
      "bin_length": 6,
      "pagos_bin_length": 6,
      "bin_min": "4854270000000000000",
      "bin_max": "4854279999999999999",
      "pan_or_token": "pan",
      "card_brand": "VISA",
      "card_segment_type": "Business",
      "type": "Debit",
      "funding_source": "DEBIT",
      "prepaid": false,
      "product": {
        "product_id": "G",
        "product_name": "Visa Business"
      },
      "bank": {
        "name": "SPACE COAST CREDIT UNION",
        "clean_name": "Space Coast Credit Union"
      },
      "country": {
        "alpha2": "US",
        "numeric": "840",
        "name": "UNITED STATES OF AMERICA"
      }
    }
  },
  "correlation_id": "test-1234-5678-90ab-cdef12345678"
}
```

### Deleted BIN Example

To test the response for a deleted BIN, use one of the deleted test ranges:

```bash theme={null}
curl --request GET \
  --url 'https://parrot.sandbox.pagosapi.com/bins/continuity?bin=65031117' \
  --header 'Authorization: Bearer <api_key>'
```

This will return the mock continuity details for a deleted BIN:

```json theme={null}
{
  "continuity": {
    "bin": "65031117",
    "bin_min": "6503111700000000000",
    "bin_max": "6503111799999999999",
    "status": "deleted",
    "first_seen_at": "2018-06-01T00:00:00Z",
    "last_seen_at": "2024-09-15T00:00:00Z",
    "flagged_for_delete_at": "2024-09-22T00:00:00Z",
    "deleted_at": "2024-10-20T00:00:00Z",
    "days_active": 2298,
    "file_appearances": 328,
    "card": {
      "number": {
        "length": 16
      },
      "card_brand": "DISCOVER",
      "type": "Credit",
      "prepaid": false,
      "bank": {
        "name": "DISCOVER BANK",
        "clean_name": "Discover Bank"
      },
      "country": {
        "alpha2": "US",
        "numeric": "840",
        "name": "UNITED STATES OF AMERICA"
      }
    }
  },
  "correlation_id": "test-abcd-efgh-ijkl-mnop12345678"
}
```

## Test Ranges

Use any BIN, first 6 to 10 digits, that fall within the below min and max bin ranges for testing. The BIN Continuity API in sandbox uses the same test ranges as the [BIN Data API](/bin-data-APIs/bin-data-api-testing#test-ranges).

### Active BINs

| BIN Range Min         | BIN Range Max         | Network    |
| :-------------------- | :-------------------- | :--------- |
| `4854270000000000000` | `4854279999999999999` | VISA       |
| `4238085010000000000` | `4238085139999999999` | VISA       |
| `4419273340000000000` | `4419279999999999999` | VISA       |
| `5578061200000000000` | `5578061299999999999` | MASTERCARD |
| `5407655500000000000` | `5407655599999999999` | MASTERCARD |
| `3113380000000000000` | `3113389999999999999` | AMEX       |
| `6011392800000000000` | `6011392899999999999` | DISCOVER   |

### Deleted BINs

Use the following BIN ranges to test historical lookups:

| BIN Range Min         | BIN Range Max         | Network  | Status  |
| :-------------------- | :-------------------- | :------- | :------ |
| `6503111700000000000` | `6503111799999999999` | DISCOVER | deleted |
| `4300693100000000000` | `4300693109999999999` | VISA     | deleted |

### Flagged for Delete BINs

| BIN Range Min         | BIN Range Max         | Network    | Status               | Weeks Remaining |
| :-------------------- | :-------------------- | :--------- | :------------------- | :-------------- |
| `5323922500000000000` | `5323922599999999999` | MASTERCARD | flagged\_for\_delete | 3               |
| `3344240000000000000` | `3344249999999999999` | AMEX       | flagged\_for\_delete | 1               |
