List Credit Notes
Lists credit notes for a site. Credit Notes are like inverse invoices. They reduce the amount a customer owes.
By default, the credit notes returned by this endpoint will exclude the arrays of line_items, discounts, taxes, applications, or refunds. To include these arrays, pass the specific field as a key in the query with a value set to true.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Query Parameters
The subscription's Advanced Billing id
The type of filter you would like to apply to your search. Use in query date_field=issue_date. If a date range is provided without an explicit date_field, it defaults to issue_date. If only start_datetime/end_datetime are provided without an explicit date_field, it defaults to created_at instead. An unrecognized date_field is ignored rather than raising an error.
"issue_date"Value in
- "issue_date"
- "applied_date"
- "created_at"
- "updated_at"
The start date (format YYYY-MM-DD) with which to filter the date_field. Returns credit notes with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified.
The end date (format YYYY-MM-DD) with which to filter the date_field. Returns credit notes with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified.
The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns credit notes with a timestamp at or after exact time provided in query. If provided, this parameter will be used instead of start_date. If no timezone offset is included in the value, it is interpreted as UTC. Allowed to be used only along with date_field set to created_at or updated_at.
The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns credit notes with a timestamp at or before exact time provided in query. If provided, this parameter will be used instead of end_date. If no timezone offset is included in the value, it is interpreted as UTC. Allowed to be used only along with date_field set to created_at or updated_at.
Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query page=1.
1 <= value1This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query per_page=200.
value <= 20020The sort direction of the returned credit notes, sorted by sequence_number.
"desc"Value in
- "asc"
- "desc"
Include line items data.
falseInclude discounts data.
falseInclude taxes data.
falseInclude refunds data.
falseInclude applications data.
falseResponse Body
application/json
curl -X GET "https://example.com/credit_notes.json"{ "credit_notes": [ { "uid": "cn_8m9vbd5kkv7kr", "site_id": 20, "customer_id": 3, "subscription_id": 2, "number": "77", "sequence_number": 78, "issue_date": "2018-12-31", "applied_date": "2018-12-31", "status": "applied", "currency": "USD", "memo": "Refund for overpayment", "seller": { "name": "Acme, Inc.", "address": { "street": "122 E Houston St", "line2": "Suite 105", "city": "San Antonio", "state": "TX", "zip": "78205", "country": "US" }, "phone": "555-555-1234 x137" }, "customer": { "chargify_id": 3, "first_name": "Marty", "last_name": "McFly", "organization": "Time Travellers, Inc.", "email": "timetraveller1985@example.com", "reference": null }, "billing_address": { "street": "200 Billing Rd.", "line2": "Suite 100", "city": "Needham", "state": "MA", "zip": "02494", "country": "US" }, "shipping_address": { "street": "100 Shipping St.", "line2": "Apt 200", "city": "Pleasantville", "state": "NC", "zip": "12345", "country": "US" }, "subtotal_amount": "208.69341779", "discount_amount": "20.87125167", "tax_amount": "12.67783387", "total_amount": "200.5", "applied_amount": "200.5", "remaining_amount": "0.0", "line_items": [ { "uid": "cnli_8k5jvdzct4h9x", "title": "IP Addresses: 5 to 10 addresses", "description": "38.2% credit", "quantity": "0.9855", "unit_price": "2.0", "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165 }, { "uid": "cnli_8kjttvjcjx8b4", "title": "Professional Plan", "description": "38.2% credit", "quantity": "0.382", "unit_price": "299.0", "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": null, "price_point_id": null }, { "uid": "cnli_8kjttvjknzhx7", "title": "Small Instance (Hourly)", "description": "38.2% credit", "quantity": "74.8676", "unit_price": "0.12244898", "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 78, "price_point_id": null }, { "uid": "cnli_8kjttvjnmh25w", "title": "Large Instance (Hourly)", "description": "38.2% credit", "quantity": "183.3492", "unit_price": "0.39583333", "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 79, "price_point_id": null }, { "uid": "cnli_8kjttvjqn86kc", "title": "Email Messages", "description": "38.2% credit", "quantity": "10076.9489", "unit_price": "0.00031045", "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 80, "price_point_id": null }, { "uid": "cnli_8kjttvjtxxbdd", "title": "IP Addresses", "description": "38.2% credit", "quantity": "3.8198", "unit_price": "2.0", "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165 } ], "discounts": [ { "uid": "cndli_8k5jvdzct4h9y", "title": "Multi-service discount (10%)", "code": "MULTI3", "source_type": "Coupon", "source_id": 40, "discount_type": "percentage", "percentage": "10.0", "eligible_amount": "208.69341779", "discount_amount": "20.87125167", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "eligible_amount": "1.971004", "discount_amount": "0.19862831" }, { "uid": "cnli_8kjttvjcjx8b4", "eligible_amount": "114.21127834", "discount_amount": "11.42112783" }, { "uid": "cnli_8kjttvjknzhx7", "eligible_amount": "9.16746047", "discount_amount": "0.91674605" }, { "uid": "cnli_8kjttvjnmh25w", "eligible_amount": "72.57572871", "discount_amount": "7.25757287" }, { "uid": "cnli_8kjttvjqn86kc", "eligible_amount": "3.12839588", "discount_amount": "0.31322157" }, { "uid": "cnli_8kjttvjtxxbdd", "eligible_amount": "7.63955039", "discount_amount": "0.76395504" } ] } ], "taxes": [ { "uid": "cntli_8k5jvdzct4h9z", "title": "NC Sales Tax", "source_type": "Tax", "source_id": 1, "percentage": "6.75", "taxable_amount": "187.82216613", "tax_amount": "12.67783387", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "taxable_amount": "1.77237569", "tax_amount": "0.11963536" }, { "uid": "cnli_8kjttvjcjx8b4", "taxable_amount": "102.7901505", "tax_amount": "6.93833516" }, { "uid": "cnli_8kjttvjknzhx7", "taxable_amount": "8.25071442", "tax_amount": "0.55692322" }, { "uid": "cnli_8kjttvjnmh25w", "taxable_amount": "65.31815584", "tax_amount": "4.40897552" }, { "uid": "cnli_8kjttvjqn86kc", "taxable_amount": "2.81517432", "tax_amount": "0.19002427" }, { "uid": "cnli_8kjttvjtxxbdd", "taxable_amount": "6.87559535", "tax_amount": "0.46410269" } ], "tax_component_breakouts": [ { "tax_rule_id": 1, "percentage": "6.75", "country_code": "US", "subdivision_code": "NC", "tax_amount": "10.66", "taxable_amount": "157.95", "tax_exempt_amount": "0.0", "non_taxable_amount": "0.0", "tax_name": "NC STATE TAX", "tax_type": "Sales", "rate_type": "General", "tax_authority_type": 45, "state_assigned_no": "", "tax_sub_type": "S" } ], "eu_vat": false, "type": "Sales", "tax_exempt_amount": "0.0" } ], "applications": [ { "uid": "cdt_8m9vbdbdwd28n", "transaction_time": "2018-12-31T21:19:28Z", "invoice_uid": "inv_8k5jvdzct4hb2", "memo": "Refund for overpayment", "applied_amount": "200.5" } ], "refunds": [ { "transaction_id": 329, "payment_id": 39, "memo": "Refund for overpayment", "original_amount": "524.9", "applied_amount": "200.5" } ] } ]}Record Payment for Multiple Invoices POST
Records an external payment against multiple invoices. To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. Note that the invoice payment amounts must be greater than 0. Total amount must be greater or equal to invoices payment amount sum.
Read Credit Note GET
Returns the details for a credit note.