Businesses
- Business
- Financial Accounts
- Documents
- Scoped Authentication
- Configuration
- Tasks & Notifications
Financial Activity
- Accounts Receivable
- Customers
- Invoices
- Invoice Payments
- Payouts
- Refunds
- Write Offs
- Accounts Payable
- Bank Transactions
- General Ledger
Accounting Reports
- Profit and Loss
- Balance Sheet
- Cash Flow Statement
Platform Configuration
- Plaid
- SMS
Activity Metrics
- Platform wide activity
- Business Activity
List refunds
Fetches a list of refunds for a business.
curl --request GET \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/invoices/refunds \
--header 'Authorization: Bearer <token>'
[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"refunded_amount": 123,
"status": "PAID",
"completed_at": "2023-11-07T05:31:56Z",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"refunded_amount": 123,
"fee": 123,
"completed_at": "2023-11-07T05:31:56Z",
"method": "CREDIT_CARD",
"processor": "STRIPE"
}
],
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"invoice_external_id": "<string>",
"invoice_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_line_item_external_id": "<string>",
"invoice_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_payment_external_id": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"notes": "<string>",
"status": "ACTIVE"
}
}
]
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Content-Type must be set to application/json
Path Parameters
The UUID of the business to fetch refunds for.
Response
Unique identifier for the refund.
Unique ID of the refund in your system for linking purposes. Idempotency key.
"31415926535"
Amount refunded to the customer in cents.
Status of the refund.
"PAID"
Time when the refund was completed.
Payments associated with this refund.
A payment represents a transaction that moves value from a customer to a business. A specific payment can be refunded or a general refund can be applied to an invoice.
Unique identifier for the payment.
Unique ID of the payment in your system for linking purposes. Idempotency key.
"31415926535"
Amount refunded to the customer in cents.
Fee charged for the refund in cents.
Time when the payment was completed.
Method of the payment.
"CREDIT_CARD"
Processor used for the payment.
"STRIPE"
Allocations associated with this refund.
Unique identifier for the refund allocation.
ID of the invoice this allocation is associated with.
Amount of the allocation in cents.
External ID of the invoice this allocation is associated with.
ID of the invoice line item this allocation is associated with. If specified, must not refer to a different invoice invoice_external
or invoice_id
.
The external ID of the invoice line item to refund. If specified alongside invoice_line_item_id
, they must refer to the same invoice line item.
ID of the invoice payment this allocation is associated with.
External ID of the invoice payment this allocation is associated with.
Unique identifier for the customer.
Unique ID of the customer in your system for linking purposes. Idempotency key.
"31415926535"
Full name of the individual customer or contact at a corporate customer.
Name of the company customer.
Email address of the customer.
Mobile phone number of the customer.
Office phone number of the customer.
Address of the customer.
Notes about the customer.
Status of the customer. Possible values: ACTIVE
, ARCHIVED
.
"ACTIVE"
curl --request GET \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/invoices/refunds \
--header 'Authorization: Bearer <token>'
[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"refunded_amount": 123,
"status": "PAID",
"completed_at": "2023-11-07T05:31:56Z",
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"refunded_amount": 123,
"fee": 123,
"completed_at": "2023-11-07T05:31:56Z",
"method": "CREDIT_CARD",
"processor": "STRIPE"
}
],
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"invoice_external_id": "<string>",
"invoice_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_line_item_external_id": "<string>",
"invoice_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_payment_external_id": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "31415926535",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"notes": "<string>",
"status": "ACTIVE"
}
}
]
}
]