The credit note's memo appears on the credit note PDF. This can be useful for providing additional information to the customer.
linesarray
Line items that make up the credit note. Each line item object can contain: type (required, one of 'invoice_line_item' or 'custom_line_item'), amount, description, invoice_line_item, quantity, tax_amounts, tax_rates, unit_amount, unit_amount_decimal. At least one of amount, line…
amountinteger
The integer amount in cents representing the total amount of the credit note. At least one of amount, lines, or shipping_cost must be provided.
reasonstring
Reason for issuing this credit note. Possible values: 'duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory'.
invoicestring
Required
ID of the invoice for which the credit note is being previewed. This is required to preview a credit note.
refundsarray
IDs of existing refunds to link to this credit note.
metadataobject
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.
email_typestring
The type of email that should be sent for this credit note. Possible values: 'credit_note', 'none'. Default is 'credit_note'.
effective_atinteger
The date when this credit note is in effect. Specified as a Unix timestamp.
credit_amountinteger
The integer amount in cents representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
refund_amountinteger
The integer amount in cents representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
shipping_costobject
The shipping cost to credit. Contains shipping_rate (required if shipping_cost is provided): the ID of the shipping rate to use for this order. At least one of amount, lines, or shipping_cost must be provided.
Observable output
data
Required
Data from the action execution
errorstring
Error if any occurred during the execution of the action
successfulboolean
Required
Whether or not the action execution was successful or not