A Vendor Refund represents a transaction where a vendor returns value to a business. They are the counterpart to Customer Refunds . Each vendor refund has one or more Vendor Refund Allocations (targets) and zero or more Vendor Refund Payments.
Creating Vendor Refunds
There are two ways to create vendor refunds:
Simple Vendor Refunds
Use simple vendor refunds when you want to fully refund a single target (bill, bill line item, or bill payment) and the refund is fully paid. Layer automatically:
Calculates the refund amount based on what can be refunded from the target
Creates one allocation that perfectly cancels out the target
Creates one refund payment that pays the refund in full
Itemized Vendor Refunds
Use itemized vendor refunds for more complex scenarios including:
Refunding multiple targets in a single refund
Partial refunds that don’t fully cancel out the target
Unpaid refunds (refunds owed but not yet received)
Custom allocation amounts or payment structures
With itemized vendor refunds, you specify all allocations and payments explicitly.
Vendor Refund Object
Attributes
Unique identifier for the vendor refund.
Unique ID of the vendor refund in your system for linking purposes. Idempotency key .
Amount refunded to the business in cents.
Status of the vendor refund.
completed_at
ISO8601 timestamp
required
Time when the vendor refund was completed.
allocations
array of VendorRefundAllocation objects
payments
array of VendorRefundPayment objects
Tags associated with the vendor refund. created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
Memo for any text you would like to associate with the vendor refund.
Arbitrary metadata you can include with the vendor refund.
Vendor Refund Allocation Object
A Vendor Refund Allocation represents one of the targets of a vendor refund. It can reference a specific bill, bill line item, bill payment, or vendor.
For example, a vendor refund can apply to two separate bills if the bills are from the same vendor.
The total of the amounts of the vendor refund allocations must add up to the refund amount.
Unique identifier for the vendor refund allocation.
ID of the bill this allocation is associated with.
Amount of the allocation in cents.
line_items
array of VendorRefundAllocationLineItem objects
External ID of the bill this allocation is associated with.
ID of the bill line item this allocation is associated with. If specified, must not refer to a different bill than bill_id
or bill_external_id
.
bill_line_item_external_id
The external ID of the bill line item to refund. If specified alongside bill_line_item_id
, they must refer to the same bill line item.
ID of the bill payment this allocation is associated with.
External ID of the bill payment this allocation is associated with.
The Vendor associated with this vendor refund allocation.
Tags associated with the vendor refund allocation. created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
Memo for any text you would like to associate with the vendor refund allocation.
Arbitrary metadata you can include with the vendor refund allocation.
Vendor Refund Allocation Line Item Object
A Vendor Refund Allocation Line Item represents a specific line within a vendor refund allocation, allowing for detailed breakdowns of how the allocation amount is distributed across different ledger accounts.
External identifier for the line item.
Amount of the line item in cents.
The ledger account associated with this line item.
The prepayment account associated with this line item, if applicable.
Tags associated with the line item. created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
Memo for any text you would like to associate with the line item.
Arbitrary metadata you can include with the line item.
Vendor Refund Payment Object
A Vendor Refund Payment represents a money movement by which the vendor refund was received by the business.
A vendor refund with zero payments represents a refund that is owed to the business but has not yet been received.
A vendor refund can have many payments so long as the total of their refunded_amount
s does not exceed the total amount of the refund.
Vendor refund payments are matchable to bank transactions and are therefore the means by which vendor refunds are reconciled with bank accounts.
Unique identifier for the payment.
Unique ID of the payment in your system for linking purposes. Idempotency key .
Amount refunded to the business in cents.
Fee paid by the business to receive the refund payment (typically a payment processing fee).
completed_at
ISO8601 timestamp
required
Time when the payment was completed.
Method of the payment (e.g., CREDIT_CARD
, ACH
, etc.).
Processor used for the payment (e.g., STRIPE
, SHOPIFY
, etc.).
Tags associated with the vendor refund payment. created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
Memo for any text you would like to associate with the vendor refund payment.
Arbitrary metadata you can include with the vendor refund payment.
Simple Vendor Refund Creation Parameters
Use these parameters to create a simple vendor refund that fully refunds a single target and is fully paid.
Unique ID of the vendor refund in your system for linking purposes. Idempotency key .
completed_at
ISO8601 timestamp
required
When the vendor refund was completed and paid.
The ID of the bill to refund. Cannot be used with other target identifiers.
The external ID of the bill to refund. Cannot be used with other target identifiers.
The ID of the bill line item to refund. Cannot be used with other target identifiers.
bill_line_item_external_id
The external ID of the bill line item to refund. Cannot be used with other target identifiers.
The ID of the bill payment to refund. Cannot be used with other target identifiers.
The external ID of the bill payment to refund. Cannot be used with other target identifiers.
Fee charged to the business for processing the refund in cents. Defaults to 0.
method
PaymentMethod enum
required
Method of the payment (e.g., CREDIT_CARD
, ACH
, etc.).
Processor used for the payment (e.g., STRIPE
, SHOPIFY
, etc.).
tags
array of TagKeyValue objects
List of tags associated with this vendor refund. Show TagKeyValue properties
Memo for any text you would like to associate with the vendor refund.
Arbitrary metadata you can include with the vendor refund.
Itemized Vendor Refund Creation Parameters
Use these parameters to create an itemized vendor refund with full control over allocations and payments.
Unique ID of the vendor refund in your system for linking purposes. Idempotency key .
The total amount of the vendor refund in cents. Must equal the sum of all allocation amounts.
completed_at
ISO8601 timestamp
required
When the vendor refund was completed.
allocations
array of VendorRefundAllocationParams objects
required
The targets of the vendor refund. Each allocation specifies how much of the refund should be applied to a specific bill, line item, payment, or vendor. Show VendorRefundAllocationParams properties
External identifier for the allocation.
Total amount of this allocation in cents. Must equal the sum of all line item amounts.
line_items
array of LineItemParams objects
required
Line items that make up this allocation.
ID of the bill this allocation targets.
External ID of the bill this allocation targets.
ID of the bill line item this allocation targets.
bill_line_item_external_id
External ID of the bill line item this allocation targets.
ID of the bill payment this allocation targets.
External ID of the bill payment this allocation targets.
ID of the vendor this allocation targets.
External ID of the vendor this allocation targets.
tags
array of TagKeyValue objects
Tags for this allocation.
Memo for this allocation.
Metadata for this allocation.
payments
array of VendorRefundPaymentParams objects
required
The payment methods and amounts used to receive the vendor refund. Show VendorRefundPaymentParams properties
External identifier for the payment.
Amount refunded to the business in cents.
Fee charged to the business for processing this payment.
completed_at
ISO8601 timestamp
required
When this payment was completed.
method
PaymentMethod enum
required
Payment method used.
Processor used for this payment.
tags
array of TagKeyValue objects
Tags for this payment.
Metadata for this payment.
tags
array of TagKeyValue objects
List of tags associated with this vendor refund.
Memo for any text you would like to associate with the vendor refund.
Arbitrary metadata you can include with the vendor refund.
{
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"external_id" : "vendor-refund-123" ,
"refunded_amount" : 500 ,
"status" : "PAID" ,
"completed_at" : "2023-11-07T05:31:56Z" ,
"allocations" : [
{
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"bill_id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"amount" : 500 ,
"line_items" : [
{
"external_id" : "line-item-1" ,
"amount" : 500 ,
"ledger_account" : {
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"name" : "Office Supplies" ,
"account_number" : "6200"
},
"prepayment_account" : null ,
"transaction_tags" : [],
"memo" : null ,
"metadata" : null
}
],
"bill_external_id" : "bill-456" ,
"bill_line_item_id" : null ,
"bill_line_item_external_id" : null ,
"bill_payment_id" : null ,
"bill_payment_external_id" : null ,
"vendor" : {
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"external_id" : "vendor-789" ,
"individual_name" : null ,
"company_name" : "Office Supply Co" ,
"email" : "accounts@officesupply.com" ,
"mobile_phone" : null ,
"office_phone" : "555-123-4567" ,
"address_string" : "456 Supply St, Business City, NY 10001" ,
"notes" : "Regular office supply vendor" ,
"status" : "ACTIVE" ,
"transaction_tags" : []
},
"transaction_tags" : [
{
"key" : "RefundReason" ,
"value" : "DefectiveItems" ,
"created_at" : "2023-11-07T05:31:56Z" ,
"updated_at" : "2023-11-07T05:31:56Z" ,
"deleted_at" : null
}
],
"memo" : "Refund for defective office supplies" ,
"metadata" : null
}
],
"payments" : [
{
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"external_id" : "payment-321" ,
"refunded_amount" : 500 ,
"refund_processing_fee" : 5 ,
"completed_at" : "2023-11-07T05:31:56Z" ,
"method" : "ACH" ,
"processor" : "STRIPE" ,
"transaction_tags" : [
{
"key" : "ProcessorReference" ,
"value" : "ach_1234567890" ,
"created_at" : "2023-11-07T05:31:56Z" ,
"updated_at" : "2023-11-07T05:31:56Z" ,
"deleted_at" : null
}
],
"memo" : null ,
"metadata" : null
}
],
"transaction_tags" : [
{
"key" : "Department" ,
"value" : "Procurement" ,
"created_at" : "2023-11-07T05:31:56Z" ,
"updated_at" : "2023-11-07T05:31:56Z" ,
"deleted_at" : null
}
],
"memo" : "Monthly office supply refund" ,
"metadata" : null
}