# Physical Checks
> Physical Checks are checks that Increase prints and mails on your behalf. They are for printing only, and meant to be used for mailing checks not associated with an Increase account.

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `physical_check.created` and `physical_check.updated`.

## The Physical Check object
### Example
```json
{
  "amount": 1000,
  "attachment_file_id": null,
  "check_number": "10002394",
  "check_voucher_image_file_id": null,
  "created_at": "2020-01-31T23:59:59Z",
  "id": "physical_check_i56pprjux9awuqti5zay",
  "idempotency_key": null,
  "mailing": null,
  "mailing_address": {
    "city": "New York",
    "line1": "33 Liberty Street",
    "line2": null,
    "name": "Ian Crease",
    "phone": null,
    "postal_code": "10045",
    "state": "NY"
  },
  "memo": "Invoice 29582",
  "note": null,
  "pay_to_the_order_of": "Ian Crease",
  "payer": [
    {
      "line": "National Phonograph Company"
    },
    {
      "line": "33 Liberty Street"
    },
    {
      "line": "New York, NY 10045"
    }
  ],
  "return_address": {
    "city": "New York",
    "line1": "33 Liberty Street",
    "line2": null,
    "name": "National Phonograph Company",
    "phone": null,
    "postal_code": "10045",
    "state": "NY"
  },
  "shipping_method": "usps_first_class",
  "signature": {
    "image_file_id": null,
    "text": "No signature required"
  },
  "source_account_number": "987654321",
  "source_routing_number": "101050001",
  "status": "pending_mailing",
  "submission": null,
  "tracking_updates": [],
  "type": "physical_check",
  "valid_until_date": null
}
```
### Attributes

## List Physical Checks
GET /physical_checks

### Example
```curl
curl \
  --url "${INCREASE_URL}/physical_checks" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `status.in` (array of enums, optional)
  Filter Physical Checks for those with the specified status or statuses. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending_submission` (The Physical Check is pending submission to the printer.)
  * `pending_mailing` (The Physical Check has been submitted and is pending mailing.)
  * `mailed` (The Physical Check has been mailed.)
  * `canceled` (The Physical Check has been canceled.)

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a Physical Check List object:
```json
{
  "data": [
    {
      "amount": 1000,
      "attachment_file_id": null,
      "check_number": "10002394",
      "check_voucher_image_file_id": null,
      "created_at": "2020-01-31T23:59:59Z",
      "id": "physical_check_i56pprjux9awuqti5zay",
      "idempotency_key": null,
      "mailing": null,
      "mailing_address": {
        "city": "New York",
        "line1": "33 Liberty Street",
        "line2": null,
        "name": "Ian Crease",
        "phone": null,
        "postal_code": "10045",
        "state": "NY"
      },
      "memo": "Invoice 29582",
      "note": null,
      "pay_to_the_order_of": "Ian Crease",
      "payer": [
        {
          "line": "National Phonograph Company"
        },
        {
          "line": "33 Liberty Street"
        },
        {
          "line": "New York, NY 10045"
        }
      ],
      "return_address": {
        "city": "New York",
        "line1": "33 Liberty Street",
        "line2": null,
        "name": "National Phonograph Company",
        "phone": null,
        "postal_code": "10045",
        "state": "NY"
      },
      "shipping_method": "usps_first_class",
      "signature": {
        "image_file_id": null,
        "text": "No signature required"
      },
      "source_account_number": "987654321",
      "source_routing_number": "101050001",
      "status": "pending_mailing",
      "submission": null,
      "tracking_updates": [],
      "type": "physical_check",
      "valid_until_date": null
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Physical Check
POST /physical_checks

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/physical_checks" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "amount": 1000,
    "check_number": "10002394",
    "mailing_address": {
      "city": "New York",
      "line1": "33 Liberty Street",
      "name": "Ian Crease",
      "postal_code": "10045",
      "state": "NY"
    },
    "memo": "Invoice 29582",
    "pay_to_the_order_of": "Ian Crease",
    "return_address": {
      "city": "New York",
      "line1": "33 Liberty Street",
      "name": "National Phonograph Company",
      "postal_code": "10045",
      "state": "NY"
    },
    "source_account_number": "987654321",
    "source_routing_number": "101050001"
  }'
```

### Body Parameters
- `amount` (integer, required)
  The check amount in USD cents.

- `attachment_file_id` (string, optional)
  The ID of a File to be attached to the check. This must have `purpose: check_attachment`.

- `check_number` (string, required)
  The check number to print on the check. This should not contain leading zeroes.

- `check_voucher_image_file_id` (string, optional)
  The ID of a File to be used as the check voucher image. This must have `purpose: check_voucher_image`.

- `mailing_address` (dictionary, required)
  Details for where the check will be mailed.

  - `mailing_address.city` (string, required)
    The city component of the check's destination address.

  - `mailing_address.line1` (string, required)
    The first line of the address component of the check's destination address.

  - `mailing_address.line2` (string, optional)
    The second line of the address component of the check's destination address.

  - `mailing_address.name` (string, optional)
    The name component of the check's destination address. Defaults to the provided `recipient_name` parameter.

  - `mailing_address.phone` (string, optional)
    The phone number to associate with the check's destination address.

  - `mailing_address.postal_code` (string, required)
    The postal code component of the check's destination address.

  - `mailing_address.state` (string, required)
    The US state component of the check's destination address.

- `memo` (string, required)
  The descriptor that will be printed on the memo field on the check.

- `note` (string, optional)
  The descriptor that will be printed on the letter included with the check.

- `pay_to_the_order_of` (string, required)
  The name that will be printed on the check in the 'Pay To The Order Of' line.

- `payer` (array of objects, optional)
  The payer of the check. This will be printed on the top-left portion of the check and defaults to the return address if unspecified.

  - `payer.line` (string, required)
    The contents of the line.

- `program_id` (string, optional)
  The identifier of the Program to create this Physical Check for. If omitted, defaults to the first Program in the group.

- `return_address` (dictionary, required)
  The return address to be printed on the check.

  - `return_address.city` (string, required)
    The city of the return address.

  - `return_address.line1` (string, required)
    The first line of the return address.

  - `return_address.line2` (string, optional)
    The second line of the return address.

  - `return_address.name` (string, required)
    The name of the return address.

  - `return_address.phone` (string, optional)
    The phone number to associate with the return address.

  - `return_address.postal_code` (string, required)
    The postal code of the return address.

  - `return_address.state` (string, required)
    The US state of the return address.

- `shipping_method` (enum, optional)
  How to ship the check. Defaults to USPS First Class.
  Cases:
  * `usps_first_class` (USPS First Class)
  * `fedex_overnight` (FedEx Overnight)

- `signature` (dictionary, optional)
  The signature that will appear on the check. If not provided, the check will be printed with 'No Signature Required'. At most one of `text` and `image_file_id` may be provided.

  - `signature.image_file_id` (string, optional)
    The ID of a File containing a PNG of the signature. This must have `purpose: check_signature` and be a 1320x120 pixel PNG.

  - `signature.text` (string, optional)
    The text that will appear as the signature on the check in cursive font.

- `source_account_number` (string, required)
  The account number to print on the check.

- `source_routing_number` (string, required)
  The routing number to print on the check.

- `valid_until_date` (string, optional)
  If provided, the check will be valid on or before this date.

## Retrieve a Physical Check
GET /physical_checks/{physical_check_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/physical_checks/physical_check_i56pprjux9awuqti5zay" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `physical_check_id` (string, required)
  The identifier of the Physical Check.