count in the response indicates the number of invoices generated for a Subscription.
Request
Curl
Response
Success
Parameters
subscription_id mandatory
: string The unique identifier linked to the Subscription. For example, sub_00000000000001.
Parameters
count
: integer The number of invoices generated for the Subscription.
item
: array List of invoices generated for the Subscription.
id
: string The unique identifier of the invoice issued for the Subscription.
entity
: string The entity being created. Here, it is invoice.
receipt
: string Here, it is null.
invoice_number
: string The invoice number. Here, it is null.
customer_id
: string The unique identifier of the customer linked to the Subscription.
customer_details
: object Details of the customer.
id
: string The unique identifier of the customer linked to the Subscription.
name
: string The customer’s name. Know more Customers API.
email
: string The customer’s email address.
contact
: string The customer’s contact number.
billing_address
: string The customer’s billing address.
shipping_address
: string The customer’s shipping address.
customer_name
: string The customer’s name.
customer_email
: string The customer’s email address.
customer_contact
: string The customer’s contact number.
order_id
: string The unique identifier of the order associated with the invoice.
subscription_id
: string The unique identifier of the Subscription. For example, sub_00000000000001.
line_items
: array Details of the line item that is billed in the invoice. Number of arrays = number of line items billed in the invoice. For example, if the Subscription starts immediately and has an upfront fee attached to it, the number of line items = 2. One for the Subscription charge and one for the upfront fee.
id
: string The unique identifier linked to the item billed in the invoice. For example, li_00000000000001.
item_id
: string Here, it is null.
name
: string The item’s name. For example, Monthly Plan.
description
: string A brief description of the item. Here, it is null.
amount
: integer The item’s price, in currency subunits. For example, 99900.
currency
: string The currency for the amount charged for the item.
type
: string The type of charge. Possible values:
planaddon
quantity
: integer The number of units of the item billed in the invoice. For example, 1.
payment_id
: string Unique identifier of the payment made by the customer using this invoice. For example, pay_00000000000001.
status
: string The status of the invoice. Possible values:
draftissuedpartially_paidpaidexpiredcancelleddeleted
expire_by
: integer The Unix timestamp, indicates at which the invoice will expire. For example, 1593411509
issued_at
: integer The Unix timestamp, indicates at which the invoice was issued to the customer. For example, 1593411209
paid_at
: integer The Unix timestamp, indicates at which the payment was made. For example, 1593411325
cancelled_at
: integer The Unix timestamp, indicates at which the invoice was canceled by you. For example, 1593411209
expired_at
: integer The Unix timestamp, indicates at which the invoice has expired. For example, 1593411209
sms_status
: string Indicates whether the SMS notification for the invoice was sent to the customer. Possible values:
pendingsent
email_status
: string Indicates whether the email notification for the invoice was sent to the customer. Possible values:
pendingsent
date
: integer The Unix timestamp, that indicates the date of the invoice.
terms
: string Any terms to be included in the invoice. Here, it is null.
partial_payment
: boolean Indicates whether the customer can make a partial payment on the invoice.
true: Customer can make partial payments.false: Customer cannot make partial payments.
amount
: integer Amount to be paid using the invoice. This should be in the smallest unit of the currency. For example, 29995.
amount_paid
: integer Amount paid by the customer using the invoice. For example, 29995.
amount_due
: integer The remaining amount to be paid by the customer for the issued invoice.
currency
: string The currency associated with the item.
description
: string A brief description of the invoice. Here, it is null.
notes
: object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
comment
: string Any comments to be added in the invoice. Here, it is null.
short_url
: string The short URL that is generated. This is the link that can be shared with customers to accept payments. Once canceled, no payments can be accepted using the link. For example, https://rzp.io/i/gb5827Hh.
view_less
: boolean Used when the link description is lengthy and you want to make the text collapsible. The text can be expanded by the customer using the Show More link.
true(default): Link description appears collapsed, with a Show More link.false: Link description appears expanded.
type
: string Here, it is invoice.
created_at
: integer The Unix timestamp, that indicates when this invoice entity was created. For example, 1593411943.
Errors
The API key/secret provided is invalid.- code: 4xx
- description: This error occurs due to a mismatch between the API credentials passed in the API call and those generated on the Dashboard.
- solution: Ensure that the API keys are active and correctly entered, with no whitespaces before or after the keys.