---
updatedAt: 2025-11-13T14:40:31.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/developers/v1.0-Global-Integration/llms.txt
---

# The Discount Object

## Attributes

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Attribute
      </th>

      <th style={{ textAlign: "left" }}>
        Data type
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        **discount\_code**
      </td>

      <td style={{ textAlign: "left" }}>
        *string*
      </td>

      <td style={{ textAlign: "left" }}>
        The name of your discount code is the name of the object that describes the amount and display name for that discount. For example, `RETURN5` is the name of the discount code, so it is represented here as the name of the first discount in the discount object.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        **discount\_amount**\ <span style={{ color: "red" }}>required</span>
      </td>

      <td style={{ textAlign: "left" }}>
        *integer*
      </td>

      <td style={{ textAlign: "left" }}>
        Amount of the discount being applied in USD or CAD cents. This value is not used to calculate the total.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        **discount\_display\_name**\ <span style={{ color: "red" }}>required</span>
      </td>

      <td style={{ textAlign: "left" }}>
        *string* 
      </td>

      <td style={{ textAlign: "left" }}>
        Friendly name of the discount being applied.
      </td>
    </tr>
  </tbody>
</Table>

```json
"discounts":{
      "RETURN5":{
         "discount_amount":500,
         "discount_display_name":"Returning customer 5% discount"
      },
      "PRESDAY10":{
         "discount_amount":1000,
         "discount_display_name":"President's Day 10% off"
      }
   }
```

# Sibling pages

* [The Merchant Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/the-merchant-object.md)
* [The Customer Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/the-customer-object.md)
* [The Metadata Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/the-metadata-object.md)
* [Name Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/name-object-1.md)
* [Address Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/address-object-1.md)
* [Shipping & Billing Objects](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/shipping-billing-objects.md)
* [The Item Object](https://docs.affirm.com/developers/v1.0-Global-Integration/reference/the-item-object.md)