Record an Invoice Refund
This endpoint records a refund made by a business to a client in Layer.
Path Parameters
ID of the Business the invoice is associated with.
Body
Unique ID of the refund in your system for linking and idempotency.
Timestamp when refund posted.
Amount of refund received by customer.
Fee, in cents, charged by payment processor for the refund.
Payment method. Possible values are: CASH
, CHECK
, CREDIT_CARD
, ACH
, STORE_CREDIT
,
OTHER
Processor used to make the payment, if any.
Any processor name can be provided and will be tracked.
Supported processors (STRIPE
, SHOPIFY
) will have additional asset balance tracking.
ID of the Customer the refund is associated with.
Either the customer_id
or the customer_external_id
must be provided.
External ID of the Customer the refund is associated with.
Either the customer_id
or the customer_external_id
must be provided.
A customer does not need to be created before creating a refund. When you provide a customer external id, Layer will create a customer object with the provided external id if it does not already exist. Customer details can be udpated later using the Update a customer endpoint.
Invoice ID this refund was applied to, if applicable.
This field does not need to be specified, but if invoice_line_item_id
is also specified, it must belong to this invoice.
Invoice external ID this refund was applied to, if applicable.
This field is for convience if it is easier to reference invoices by an external ID.
This field can be used instead of or alongside invoice_id
, but if both are specified, they must refer to the same invoice.
Invoice line item ID specifying an exact product or service which was refunded.
Payment ID this refund was applied to, if applicable.
Specifies the payment this refund was applied to using the external ID of that payment.
This field is for convenience if it is easier to reference payments by an external ID.
This field can be used instead of or alongside invoice_payment_id
, but if both are specified, they must refer to the same payment.
Response
Returns the created Refund Object