> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bills Entity

> Entity parameters and sample code for Bills API.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

The Bills entity has the following parameters:

<ResponseExample>
  ```json Entity theme={null}
  {
    "id": "bill_PYamApGCFTAjkh",
    "business_type": "retail",
    "business_category": "retail_and_consumer_goods",
    "customer": {
      "contact": "9876543210",
      "name": "Gaurav Kumar",
      "email": "",
      "customer_id": "",
      "date_of_birth": "",
      "profession": "",
      "company_name": "",
      "marital_status": "",
      "spouse_name": "",
      "anniversary_date": "",
      "gender": "",
      "gstin": "",
      "billing_address": null,
      "shipping_address": null
    },
    "loyalty": null,
    "store_code": "JK-001",
    "receipt_timestamp": 1722664800,
    "receipt_number": "INV001250013",
    "receipt_type": "tax_invoice",
    "receipt_delivery": "digital",
    "bar_code_number": "3412",
    "qr_code_number": "T2322 00000009291",
    "billing_pos_number": "bn",
    "pos_category": "traditional_pos",
    "order_number": "ORD213",
    "order_service_type": "",
    "delivery_status_url": "",
    "line_items": [
      {
        "name": "Acme Soap",
        "quantity": 1,
        "unit_amount": 10000,
        "employee_id": "1234",
        "unit": "pc",
        "description": "",
        "hsn_code": "HC2000INCLT",
        "product_code": "DRCO38",
        "product_uid": "",
        "image_url": "",
        "total_amount": 10000,
        "brand": "",
        "style": "",
        "colour": "",
        "size": "",
        "financier_data": null,
        "taxes": [
          {
            "name": "CGST",
            "percentage": 10,
            "amount": 1000
          },
          {
            "name": "SGST",
            "percentage": 10,
            "amount": 1000
          }
        ],
        "tags": [
          "noise cancelling",
          "limited edition"
        ],
        "sub_items": [
          {
            "name": "Advanced Edition",
            "quantity": 1,
            "unit_amount": 0,
            "employee_id": "1234",
            "unit": "pc",
            "description": "",
            "hsn_code": "",
            "product_code": "",
            "product_uid": "",
            "image_url": "",
            "total_amount": 10,
            "brand": "",
            "style": "",
            "colour": "",
            "size": "",
            "taxes": [],
            "tags": []
          }
        ]
      },
      {
        "name": "Acme Earphones",
        "quantity": 1,
        "unit_amount": 80000,
        "employee_id": "1234",
        "unit": "pc",
        "description": "",
        "hsn_code": "HC2000INPPLT",
        "product_code": "POPLT281",
        "product_uid": "",
        "image_url": "",
        "total_amount": 80000,
        "brand": "",
        "style": "",
        "colour": "",
        "size": "",
        "financier_data": null,
        "taxes": [
          {
            "name": "CGST",
            "percentage": 10,
            "amount": 8000
          },
          {
            "name": "SGST",
            "percentage": 10,
            "amount": 8000
          }
        ],
        "tags": [],
        "sub_items": []
      }
    ],
    "receipt_summary": {
      "total_quantity": 2,
      "sub_total_amount": 150000,
      "currency": "INR",
      "net_payable_amount": 187500,
      "additional_charges": [
        {
          "description": "alteration charge",
          "amount": 2000
        },
        {
          "description": "cash on delivery",
          "amount": 2000
        },
      ],
      "payment_status": "success",
      "change_amount": 0,
      "roundup_amount": 0,
      "total_discount_percent": 0,
      "total_discount_amount": 0,
      "discounts": [
        {
          "name": "none",
          "amount": 0,
          "percent": 10
        }
      ],
      "used_wallet_amount": 0,
      "total_tax_amount": 37500,
      "total_tax_percent": 25
    },
    "taxes": [
      {
        "name": "CGST",
        "percentage": 10,
        "amount": 150
      },
      {
        "name": "SGST",
        "percentage": 10,
        "amount": 150
      },
      {
        "name": "cess",
        "percentage": 5,
        "amount": 75
      }
    ],
    "payments": [
      {
        "method": "paytm",
        "currency": "INR",
        "amount": 90000,
        "payment_reference_id": "",
        "financier_data": {
          "reference": "",
          "name": "v"
        }
      }
    ],
    "event": null,
    "receipt_url": "yourbill.me/PYamApGCFTAjkh",
    "created_at": 1722664800,
    "tags": [
      "noise cancelling",
      "limited edition"
    ]
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string" required>
  Unique id of the bill generated.
</ResponseField>

<ResponseField name="business_type" type="string" required>
  The type of business. Possible values:

  * `ecommerce`
  * `retail`
</ResponseField>

<ResponseField name="business_category" type="string" required>
  The category the business falls under. Possible values:

  * `events`
  * `food_and_beverages`
  * `retail_and_consumer_goods`
  * `other_services`
</ResponseField>

<ResponseField name="customer" type="object" required>
  Details of the customer. Required if receipt mode is `digital` or `digital_and_print`.
</ResponseField>

<ResponseField name="contact" type="string" required>
  The customer's phone number. Required if receipt mode is `digital` or `digital_and_print` and `email` is not present.
</ResponseField>

<ResponseField name="name" type="string">
  The customer's name.
</ResponseField>

<ResponseField name="email" type="string" required>
  The customer's email address. Required if receipt mode is `digital` or `digital_and_print` and `contact` not present.
</ResponseField>

<ResponseField name="customer_id" type="string">
  The customer's customer\_id. Required if receipt mode is `digital` or `digital_and_print` and neither `contact` nor `email` is present.
</ResponseField>

<ResponseField name="age" type="integer">
  Age of the customer.
</ResponseField>

<ResponseField name="date_of_birth" type="string">
  Customer's date of birth.
</ResponseField>

<ResponseField name="pan" type="string">
  PAN number of the billed customer.
</ResponseField>

<ResponseField name="profession" type="string">
  Customer's current job profile name.
</ResponseField>

<ResponseField name="company_name" type="string">
  Customer current employer.
</ResponseField>

<ResponseField name="date_of_birth" type="string">
  Customer's date of birth.
</ResponseField>

<ResponseField name="marital_status" type="string">
  Customer's marital status. Possible values:

  * `married`
  * `unmarried`
</ResponseField>

<ResponseField name="spouse_name" type="string">
  Name of customer's spouse.
</ResponseField>

<ResponseField name="anniversary_date" type="string">
  Customer's date of anniversary.
</ResponseField>

<ResponseField name="gender" type="string">
  Customer gender. Possible values:

  * `male`
  * `female`
  * `other`
</ResponseField>

<ResponseField name="gstin" type="string">
  Customer's GST number.
</ResponseField>

<ResponseField name="billing_address" type="object" required>
  Customer's billing address. Required if your `business_type` is `ecommerce`.
</ResponseField>

<ResponseField name="address_line_1" type="string">
  Customer billing address line 1.
</ResponseField>

<ResponseField name="address_line_2" type="string">
  Customer billing address line 2.
</ResponseField>

<ResponseField name="landmark" type="string">
  Customer billing address landmark.
</ResponseField>

<ResponseField name="city" type="string">
  Customer billing address city.
</ResponseField>

<ResponseField name="province" type="string">
  Customer billing address province.
</ResponseField>

<ResponseField name="pin_code" type="string">
  Customer billing address PIN code.
</ResponseField>

<ResponseField name="country" type="string">
  Customer billing address country.
</ResponseField>

<ResponseField name="shipping_address" type="object" required>
  Customer's billing address. Required if your `business_type` is `ecommerce`.
</ResponseField>

<ResponseField name="customer_name" type="string">
  Name of the recipient.
</ResponseField>

<ResponseField name="contact" type="string">
  The mobile number of the recipient.
</ResponseField>

<ResponseField name="gstin" type="string">
  GST number of the recipient.
</ResponseField>

<ResponseField name="pan" type="string">
  PAN number of the recipient.
</ResponseField>

<ResponseField name="address_line_1" type="string">
  Customer shipping address line 1.
</ResponseField>

<ResponseField name="address_line_2" type="string">
  Customer shipping address line 2.
</ResponseField>

<ResponseField name="landmark" type="string">
  Customer shipping address landmark.
</ResponseField>

<ResponseField name="city" type="string">
  Customer shipping address city.
</ResponseField>

<ResponseField name="province" type="string">
  Customer shipping address province.
</ResponseField>

<ResponseField name="pin_code" type="string">
  Customer shipping address PIN code.
</ResponseField>

<ResponseField name="country" type="string">
  Customer shipping address country.
</ResponseField>

<ResponseField name="employee" type="object">
  This is an array of objects containing details of the employees associated with the receipt.
</ResponseField>

<ResponseField name="id" type="string">
  Employee ID/code.
</ResponseField>

<ResponseField name="name" type="string">
  Employee name.
</ResponseField>

<ResponseField name="role" type="string">
  Employee designation/role.
</ResponseField>

<ResponseField name="loyalty" type="object" required>
  Customer loyalty details.
</ResponseField>

<ResponseField name="type" type="string">
  Customer loyalty type.
</ResponseField>

<ResponseField name="card_num" type="string">
  Hashed debit/credit card number provided by the customer.
</ResponseField>

<ResponseField name="card_holder_name" type="string">
  Name of the card holder.
</ResponseField>

<ResponseField name="wallet_amount" type="integer">
  Wallet amount after used rewards of the customer.
</ResponseField>

<ResponseField name="amount_saved" type="integer">
  Amount saved by the customer.
</ResponseField>

<ResponseField name="points_earned" type="integer">
  Points earned by the customer after a transaction.
</ResponseField>

<ResponseField name="points_redeemed" type="integer">
  Points redeemed by the customer on a transaction.
</ResponseField>

<ResponseField name="points_available" type="integer">
  Points available to the customer at the beginning of the transaction.
</ResponseField>

<ResponseField name="points_balance" type="integer">
  Points available to the customer at the end of the transaction.
</ResponseField>

<ResponseField name="store_code" type="string" required>
  Associated store code for the receipt. Required if you have a multi-store setup where you have a single integration and have multiple stores under you.
</ResponseField>

<ResponseField name="receipt_timestamp" type="integer" required>
  UNIX timestamp of the date and time when the receipt was generated.
</ResponseField>

<ResponseField name="receipt_number" type="string" required>
  Unique receipt number generated for the bill.
</ResponseField>

<ResponseField name="receipt_type" type="string" required>
  The type of receipt. Possible values:

  * `tax_invoice`
  * `sales_invoice`
  * `sales_return_invoice`
  * `proforma_invoice`
  * `credit_invoice`
  * `purchase_invoice`
  * `debit_invoice`
  * `order_confirmation`
</ResponseField>

<ResponseField name="receipt_delivery" type="string" required>
  Indicates the delivery type of the receipt. Possible values:

  * `digital`
  * `print`
  * `digital_and_print`
</ResponseField>

<ResponseField name="tags" type="array">
  An array of strings representing relevant tags associated with the invoice.
</ResponseField>

<ResponseField name="bar_code_number" type="integer">
  Bar code generated after the transaction. This will be displayed on the digital bill only.
</ResponseField>

<ResponseField name="qr_code_number" type="integer">
  QR code generated after the transaction. This will be displayed on the digital bill only.
</ResponseField>

<ResponseField name="billing_pos_number" type="string">
  POS number of the machine that generated the bill. This is applicable if `business_type` is `retail`.
</ResponseField>

<ResponseField name="pos_category" type="string">
  The type of POS machine. This is applicable if `business_type` is `retail`. Possible values:

  * `traditional_pos`
  * `kiosk_pos`
</ResponseField>

<ResponseField name="order_number" type="string">
  Incremental order number of the generated bill.
</ResponseField>

<ResponseField name="order_service_type" type="string">
  Order service type of the generated bill. This is applicable if `business_category` is `food_and_beverages`. Possible values:

  * `dine_in`
  * `take_away`
</ResponseField>

<ResponseField name="delivery_status_url" type="string">
  Order delivery status. This is applicable if `business_type` is `ecommerce`.
</ResponseField>

<ResponseField name="line_items" type="object" required>
  This is an array of objects containing the product data of the bill. Required if `receipt_type` is not `credit_invoice` or `debit_invoice`.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the product.
</ResponseField>

<ResponseField name="quantity" type="float">
  Quantity of the product.
</ResponseField>

<ResponseField name="unit_amount" type="integer">
  Price of the product.
</ResponseField>

<ResponseField name="unit" type="string">
  Type of unit. Possible values:

  * `kg`
  * `g`
  * `mg`
  * `lt`
  * `ml`
  * `pc`
  * `cm`
  * `m`
  * `in`
  * `ft`
  * `set`
</ResponseField>

<ResponseField name="gross_weight" type="float">
  The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments.
</ResponseField>

<ResponseField name="net_weight" type="float">
  The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials.
</ResponseField>

<ResponseField name="description" type="string">
  Product/Item description.
</ResponseField>

<ResponseField name="hsn_code" type="string">
  HSN code of the product.
</ResponseField>

<ResponseField name="product_code" type="string">
  Product/Item code.
</ResponseField>

<ResponseField name="product_uid" type="string">
  Product/Item UID/SKU Code.
</ResponseField>

<ResponseField name="image_url" type="string">
  Image URL of the product.
</ResponseField>

<ResponseField name="total_amount" type="integer" required>
  Total amount of the product.
</ResponseField>

<ResponseField name="brand" type="string">
  Brand name of the product.
</ResponseField>

<ResponseField name="style" type="string">
  Product style.
</ResponseField>

<ResponseField name="colour" type="string">
  Colour of the product.
</ResponseField>

<ResponseField name="size" type="string">
  Size of the product in `cm`.
</ResponseField>

<ResponseField name="tags" type="string">
  An array of strings representing relevant tags associated with the item.
</ResponseField>

<ResponseField name="employee_id" type="string">
  Unique ID of the employee who sold the product.
</ResponseField>

<ResponseField name="additional_charges" type="object">
  This is an array of objects containing details of any additional charges on the item.
</ResponseField>

<ResponseField name="description" type="string">
  Description of the additional charges.
</ResponseField>

<ResponseField name="amount" type="integer">
  Amount of additional charges.
</ResponseField>

<ResponseField name="percent" type="float">
  Percent calculated on total amount.
</ResponseField>

<ResponseField name="sub_items" type="object" required>
  An array of objects containing the sub-item details of the item.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the sub-item.
</ResponseField>

<ResponseField name="quantity" type="integer" required>
  Sub-item quantity.
</ResponseField>

<ResponseField name="unit_amount" type="integer">
  Price of the sub-item.
</ResponseField>

<ResponseField name="unit" type="string">
  Type of unit. Possible values:

  * `kg`
  * `g`
  * `mg`
  * `lt`
  * `ml`
  * `pc`
  * `cm`
  * `m`
  * `in`
  * `ft`
  * `set`
</ResponseField>

<ResponseField name="gross_weight" type="float">
  The total weight of the item, including all materials such as metal, stones, diamonds, and other embellishments.
</ResponseField>

<ResponseField name="net_weight" type="float">
  The weight of only the metal used in the item, excluding the weight of any diamonds, stones, or other materials.
</ResponseField>

<ResponseField name="description" type="string">
  Sub-item description.
</ResponseField>

<ResponseField name="hsn_code" type="string">
  HSN code of the product.
</ResponseField>

<ResponseField name="product_code" type="string">
  Sub-item code.
</ResponseField>

<ResponseField name="product_uid" type="string">
  Sub-item UID/SKU Code.
</ResponseField>

<ResponseField name="image_url" type="string">
  Image URL of the sub-item.
</ResponseField>

<ResponseField name="total_amount" type="integer" required>
  Total amount of the sub-item.
</ResponseField>

<ResponseField name="brand" type="string">
  Brand name of the sub-item.
</ResponseField>

<ResponseField name="style" type="string">
  Sub-item style.
</ResponseField>

<ResponseField name="colour" type="string">
  Colour of the sub-item.
</ResponseField>

<ResponseField name="size" type="string">
  Size of the sub-item in `cm`.
</ResponseField>

<ResponseField name="tags" type="string">
  An array of strings representing relevant tags associated with the sub-item.
</ResponseField>

<ResponseField name="additional_charges" type="object">
  This is an array of objects containing details of any additional charges on the item.
</ResponseField>

<ResponseField name="description" type="string">
  Description of the additional charges.
</ResponseField>

<ResponseField name="amount" type="integer">
  Amount of additional charges.
</ResponseField>

<ResponseField name="percent" type="float">
  Percent calculated on total amount.
</ResponseField>

<ResponseField name="taxes" type="object">
  This is an array of objects containing the details of the taxes incurred.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the tax. For example, CGST, SGST and so on.
</ResponseField>

<ResponseField name="percentage" type="float">
  Percentage of tax.
</ResponseField>

<ResponseField name="amount" type="integer" required>
  Applicable tax calculated on total amount.
</ResponseField>

<ResponseField name="taxes" type="object">
  This is an array of objects containing the details of the taxes incurred.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the tax. For example, CGST, SGST and so on.
</ResponseField>

<ResponseField name="percentage" type="float">
  Percentage of tax.
</ResponseField>

<ResponseField name="amount" type="integer" required>
  Applicable tax calculated on total amount.
</ResponseField>

<ResponseField name="receipt_summary" type="object" required>
  Details of the receipt.
</ResponseField>

<ResponseField name="total_quantity" type="integer" required>
  Total product quantity sold in the invoice.
</ResponseField>

<ResponseField name="sub_total_amount" type="integer">
  The total amount before taxes, discounts and additional fees are added to the invoice.
</ResponseField>

<ResponseField name="currency" type="string" required>
  The currency of the invoice. Refer to this [sheet](/docs/pos/billme/appendix) for the list of supported currencies.
</ResponseField>

<ResponseField name="total_tax_amount" type="integer">
  Total tax amount in paise.
</ResponseField>

<ResponseField name="total_tax_percent" type="float">
  Total tax percentage applied on the receipt.
</ResponseField>

<ResponseField name="net_payable_amount" type="integer" required>
  The total amount payable after adding taxes, discounts and additional fees to the invoice.
</ResponseField>

<ResponseField name="additional_charges" type="object">
  This is an array of objects containing the details of any additional charges applied on the invoice. If `additional_charges` is present, then `description` and `amount` are required.
</ResponseField>

<ResponseField name="description" type="string">
  Description of the additional charge.
</ResponseField>

<ResponseField name="amount" type="integer">
  Amount of the additional charge.
</ResponseField>

<ResponseField name="percent" type="float">
  Percent calculated on total amount.
</ResponseField>

<ResponseField name="payment_status" type="string">
  Status of the payment. Possible values:

  * `pending`
  * `authorized`
  * `failed`
  * `declined`
  * `refunded`
  * `cancelled`
  * `processed`
  * `settled`
  * `voided`
  * `success`
  * `paid`
  * `unpaid`
</ResponseField>

<ResponseField name="change_amount" type="integer">
  Change amount to be returned to the customer if the payment was made in cash.
</ResponseField>

<ResponseField name="roundup_amount" type="integer">
  Change amount to be returned to the customer if the payment was made in cash.
</ResponseField>

<ResponseField name="total_discount_percent" type="float">
  Total percentage of the discount on the sub-total amount without the taxes.
</ResponseField>

<ResponseField name="total_discount_amount" type="integer">
  Total value of the discount on the invoice.
</ResponseField>

<ResponseField name="discounts" type="object">
  This is an array of objects containing the details of the discount. If product reference (`product_code`, `product_uid`, or `hsn_code`) is present in the object, then the discount will be on the item. If not, the discount will be on the invoice.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the discount.
</ResponseField>

<ResponseField name="amount" type="string">
  Amount of the applied discount.
</ResponseField>

<ResponseField name="percent" type="integer">
  Percentile value of the discounted amount.
</ResponseField>

<ResponseField name="product_code" type="string">
  Product/Item code.
</ResponseField>

<ResponseField name="product_uid" type="string">
  Product/Item UID/SKU Code.
</ResponseField>

<ResponseField name="hsn_code" type="string">
  HSN code of the product.
</ResponseField>

<ResponseField name="reference_id" type="string">
  Reference ID of the discount.
</ResponseField>

<ResponseField name="used_wallet_amount" type="string">
  Amount used from the customer's wallet for this transaction.
</ResponseField>

<ResponseField name="taxes" type="object" required>
  This is an array of objects containing the details of the taxes applied. Required if `receipt_type` is `tax_inovice`, `purchase_invoice` or `sales_invoice`.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the tax. For example, CGST, SGST and so on.
</ResponseField>

<ResponseField name="percentage" type="float">
  Percentage of tax.
</ResponseField>

<ResponseField name="amount" type="integer" required>
  Applicable tax calculated on total amount.
</ResponseField>

<ResponseField name="payments" type="object" required>
  Details of the payment.
</ResponseField>

<ResponseField name="method" type="string" required>
  The mode of payment.
</ResponseField>

<ResponseField name="currency" type="string" required>
  The currency in which the payment was made.
</ResponseField>

<ResponseField name="amount" type="integer" required>
  The amount of the payment in paise. For example, if the amount is `1200`. The unit will be `120000`.
</ResponseField>

<ResponseField name="payment_reference_id" type="string">
  The Unique id of the payment method.
</ResponseField>

<ResponseField name="financier_data" type="object">
  Details of the financier.
</ResponseField>

<ResponseField name="reference" type="string">
  Unique id of the financier.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the financier.
</ResponseField>

<ResponseField name="event" type="object" required>
  Details of the event booking. Required if `business_category` is `events`.
</ResponseField>

<ResponseField name="name" type="string" required>
  Name of the event.
</ResponseField>

<ResponseField name="start_timestamp" type="integer">
  The exact time in seconds when the event starts.
</ResponseField>

<ResponseField name="end_timestamp" type="integer">
  The exact time in seconds when the event ends.
</ResponseField>

<ResponseField name="location" type="string">
  The location/venue of the event.
</ResponseField>

<ResponseField name="room" type="string">
  The specific room where the event was held.
</ResponseField>

<ResponseField name="seats" type="string">
  The number of seats booked for the event.
</ResponseField>

<ResponseField name="irn" type="object">
  This object contains IRN ( Invoice Reference Number ) related details. If `irn` is present,
  qr\_code and irn\_number are required.
</ResponseField>

<ResponseField name="acknowledgement_number" type="string">
  Acknowledgement number of the generated IRN.
</ResponseField>

<ResponseField name="acknowledgement_date" type="integer">
  Acknowledgement date of the generated IRN.
</ResponseField>

<ResponseField name="qr_code" type="string" required>
  QR code associated with the IRN. Required if IRN is present.
</ResponseField>

<ResponseField name="irn_number" type="string" required>
  E-invoice IRN. Required if IRN is present.
</ResponseField>

<ResponseField name="receipt_url" type="string">
  The link to the receipt.
</ResponseField>

<ResponseField name="created_at" type="integer">
  UNIX timestamp of the date when the bill was generated.
</ResponseField>
