# 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/webhooks.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
- `amount` (integer)
  The check amount in USD cents.

- `attachment_file_id` (string, nullable)
  The ID of the file for the check attachment.

- `check_number` (string)
  The check number printed on the check.

- `check_voucher_image_file_id` (string, nullable)
  The ID of the file for the check voucher image.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Physical Check was created.

- `id` (string)
  The Physical Check's identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this 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).

- `mailing` (dictionary, nullable)
  If the check has been mailed, this will contain details of the shipment.

  - `mailing.image_id` (string, nullable)
    The ID of the file corresponding to an image of the check that was mailed, if available.

  - `mailing.mailed_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the check was mailed.

  - `mailing.tracking_number` (string, nullable)
    The tracking number of the shipment, if available for the shipping method.

- `mailing_address` (dictionary)
  The mailing address for the check.

  - `mailing_address.city` (string)
    The city of the address.

  - `mailing_address.line1` (string)
    The first line of the address.

  - `mailing_address.line2` (string, nullable)
    The second line of the address.

  - `mailing_address.name` (string, nullable)
    The name component of the address.

  - `mailing_address.phone` (string, nullable)
    The phone number for delivery issues.

  - `mailing_address.postal_code` (string)
    The postal code of the address.

  - `mailing_address.state` (string)
    The state of the address.

- `memo` (string, nullable)
  The descriptor printed on the memo field of the check.

- `note` (string, nullable)
  The note printed on the trifold centered sheet with the check.

- `pay_to_the_order_of` (string)
  The name printed on the check in the "Pay To The Order Of" line.

- `payer` (array of objects)
  The payer information printed on the check.

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

- `return_address` (dictionary)
  The return address printed on the check.

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

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

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

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

  - `return_address.phone` (string, nullable)
    The phone number for delivery issues.

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

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

- `shipping_method` (enum)
  The shipping method for the check.
  Cases:
  * `usps_first_class` (USPS First Class)
  * `fedex_overnight` (FedEx Overnight)

- `signature` (dictionary)
  The signature that will appear on the check.

  - `signature.image_file_id` (string, nullable)
    The ID of a File containing a PNG of the signature.

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

- `source_account_number` (string)
  The account number printed on the check.

- `source_routing_number` (string)
  The routing number printed on the check.

- `status` (enum)
  The lifecycle status of the Physical Check.
  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.)

- `submission` (dictionary, nullable)
  After the check is submitted to our check printer, this will contain supplemental details.

  - `submission.submitted_at` (string)
    When this check was submitted to our check printer.

- `tracking_updates` (array of objects)
  Tracking updates relating to the check's delivery.

  - `tracking_updates.category` (enum)
    The type of tracking event.
    Cases:
    * `in_transit` (The check is in transit.)
    * `processed_for_delivery` (The check has been processed for delivery.)
    * `delivered` (The check has been delivered. Note that some couriers track delivery status based on driver location data rather than an explicit scan. While uncommon, a single check may have more than one delivered event.)
    * `delivery_issue` (There is an issue preventing delivery. The delivery will be attempted again if possible. If the issue cannot be resolved, the check will be returned to sender.)
    * `returned_to_sender` (Delivery failed and the check was returned to sender.)

  - `tracking_updates.country` (string)
    The ISO 3166-1 alpha-2 country code for the country where the event took place.

  - `tracking_updates.created_at` (string)
    The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the tracking event took place.

  - `tracking_updates.postal_code` (string)
    The postal code where the event took place.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `physical_check`.

- `valid_until_date` (string, nullable)
  The date until which the check is valid.

## 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.