Retrieve a credit note preview's line items
GET / v1 / credit_notes / preview / lines
When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
Parameters
- invoice string Required ID of the invoice.
- lines array of objects Required conditionally Line items that make up the credit note. One of
amount,lines, orshipping_costmust be provided. - memo string The credit note’s memo appears on the credit note PDF.
- metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata. - reason enum Reason for issuing this credit note, one of
duplicate,fraudulent,order_change, orproduct_unsatisfactoryPossible enum valuesduplicateCredit issued for a duplicate payment or chargefraudulentCredit note issued for fraudulent activityorder_changeCredit note issued for order changeproduct_unsatisfactoryCredit note issued for unsatisfactory product
More parameters
- amount integer Required conditionally
- credit _ amount integer
- effective _ at timestamp
- email _ type enum
- ending _ before string
- limit integer
- out _ of _ band _ amount integer
- refund _ amount integer
- refunds array of objects
- shipping _ cost object Required conditionally
- starting _ after string
Returns
Returns a list of line_item objects.
Response
Retrieve a credit note's line items
GET / v1 / credit_notes /:id / lines
When retrieving a credit note, you’ll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
Parameters
No parameters.
More parameters
- ending _ before string
- limit integer
- starting _ after string
Returns
Returns a list of line_item objects.
Response
List all credit notes
GET / v1 / credit_notes
Returns a list of credit notes.
Parameters
- invoice string Only return credit notes for the invoice specified by this invoice ID.
More parameters
- created object
- customer string
- customer _ account string
- ending _ before string
- limit integer
- starting _ after string
Returns
A dictionary with a data property that contains an array of up to limit credit notes, starting after credit note starting_after. Each entry in the array is a separate credit note object. If no more credit notes are available, the resulting array will be empty.
Response
