# The Credit Note object

### The Credit Note object

```json
{
  "id": "cn_1MxvRqLkdIwHu7ixY0xbUcxk",
  "object": "credit_note",
  "amount": 1099,
  "amount_shipping": 0,
  "created": 1681750958,
  "currency": "usd",
  "customer": "cus_NjLgPhUokHubJC",
  "customer_balance_transaction": null,
  "discount_amount": 0,
  "discount_amounts": [],
  "invoice": "in_1MxvRkLkdIwHu7ixABNtI99m",
  "lines": {
    "object": "list",
    "data": [
      {
        "id": "cnli_1MxvRqLkdIwHu7ixFpdhBFQf",
        "object": "credit_note_line_item",
        "amount": 1099,
        "description": "T-shirt",
        "discount_amount": 0,
        "discount_amounts": [],
        "invoice_line_item": "il_1MxvRlLkdIwHu7ixnkbntxUV",
        "livemode": false,
        "quantity": 1,
        "tax_rates": [],
        "taxes": [],
        "type": "invoice_line_item",
        "unit_amount": 1099,
        "unit_amount_decimal": "1099"
      }
    ],
    "has_more": false,
    "url": "/v1/credit_notes/cn_1MxvRqLkdIwHu7ixY0xbUcxk/lines"
  },
  "livemode": false,
  "memo": null,
  "metadata": {},
  "number": "C9E0C52C-0036-CN-01",
  "out_of_band_amount": null,
  "pdf": "https://pay.stripe.com/credit_notes/acct_1M2JTkLkdIwHu7ix/test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LF9Oak9FOUtQNFlPdk52UXhFd2Z4SU45alpEd21kd0Y4LDcyMjkxNzU50200cROQsSK2/pdf?s=ap",
  "pre_payment_amount": 1099,
  "post_payment_amount": 0,
  "reason": null,
  "refunds": [],
  "shipping_cost": null,
  "status": "issued",
  "subtotal": 1099,
  "subtotal_excluding_tax": 1099,
  "total": 1099,
  "total_excluding_tax": 1099,
  "total_taxes": [],
  "type": "pre_payment",
  "voided_at": null
}
```

## Attributes

- `id` (string)
  Unique identifier for the object.

- `object` (string)
  String representing the object’s type. Objects of the same type share the same value.

- `amount` (integer)
  The integer amount in the smallest currency unit representing the total amount of the credit note, including tax.

- `amount_shipping` (integer)
  This is the sum of all the shipping amounts.

- `created` (timestamp)
  Time at which the object was created. Measured in seconds since the Unix epoch.

- `currency` (enum)
  Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies.md).

- `customer` (string, expandable (can be expanded into an object with the `expand` request parameter))
  ID of the customer.

- `customer_account` (string, nullable)
  ID of the account representing the customer.

- `customer_balance_transaction` (string, nullable, expandable (can be expanded into an object with the `expand` request parameter))
  Customer balance transaction related to this credit note.

- `discount_amount` (integer)
  The integer amount in the smallest currency unit representing the total amount of discount that was credited.

- [`discount_amounts`](https://docs.stripe.com/api/credit_notes/object.md?query=discount_amounts) (array of objects)
  The aggregate amounts calculated per discount for all line items.

- `effective_at` (timestamp, nullable)
  The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated ‘Date of issue’ printed on the credit note PDF.

- `invoice` (string, expandable (can be expanded into an object with the `expand` request parameter))
  ID of the invoice.

- [`lines`](https://docs.stripe.com/api/credit_notes/object.md?query=lines) (object)
  Line items that make up the credit note

- `livemode` (boolean)
  If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.

- `memo` (string, nullable)
  Customer-facing text that appears on the credit note PDF.

- `metadata` (map, nullable)
  Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

- `number` (string)
  A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.

- `out_of_band_amount` (integer, nullable)
  Amount that was credited outside of Stripe.

- `pdf` (string)
  The link to download the PDF of the credit note.

- `post_payment_amount` (integer)
  The amount of the credit note that was refunded to the customer, credited to the customer’s balance, credited outside of Stripe, or any combination thereof.

- `pre_payment_amount` (integer)
  The amount of the credit note by which the invoice’s `amount_remaining` and `amount_due` were reduced.

- [`pretax_credit_amounts`](https://docs.stripe.com/api/credit_notes/object.md?query=pretax_credit_amounts) (array of objects)
  The pretax credit amounts (ex: discount, credit grants, etc) for all line items.

- `reason` (enum, nullable)
  Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
Possible enum values:
  - `duplicate`
    Credit issued for a duplicate payment or charge

  - `fraudulent`
    Credit note issued for fraudulent activity

  - `order_change`
    Credit note issued for order change

  - `product_unsatisfactory`
    Credit note issued for unsatisfactory product

- [`refunds`](https://docs.stripe.com/api/credit_notes/object.md?query=refunds) (array of objects)
  Refunds related to this credit note.

- [`shipping_cost`](https://docs.stripe.com/api/credit_notes/object.md?query=shipping_cost) (object, nullable)
  The details of the cost of shipping, including the ShippingRate applied to the invoice.

- `status` (enum)
  Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://docs.stripe.com/billing/invoices/credit-notes.md#voiding).
Possible enum values:
  - `issued`
    The credit note has been issued.

  - `void`
    The credit note has been voided.

- `subtotal` (integer)
  The integer amount in the smallest currency unit representing the amount of the credit note, excluding exclusive tax and invoice level discounts.

- `subtotal_excluding_tax` (integer, nullable)
  The integer amount in the smallest currency unit representing the amount of the credit note, excluding all tax and invoice level discounts.

- `total` (integer)
  The integer amount in the smallest currency unit representing the total amount of the credit note, including tax and all discount.

- `total_excluding_tax` (integer, nullable)
  The integer amount in the smallest currency unit representing the total amount of the credit note, excluding tax, but including discounts.

- [`total_taxes`](https://docs.stripe.com/api/credit_notes/object.md?query=total_taxes) (array of objects, nullable)
  The aggregate tax information for all line items.

- `type` (enum)
  Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
Possible enum values:
  - `mixed`
  - `post_payment`
  - `pre_payment`

- `voided_at` (timestamp, nullable)
  The time that the credit note was voided.
