GET
/
v1
/
businesses
/
{businessId}
/
bills
/
refunds
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/refunds \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "vendor-refund-123",
    "refunded_amount": 123,
    "status": "PAID",
    "completed_at": "2023-11-07T05:31:56Z",
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123,
        "line_items": [
          {
            "external_id": "<string>",
            "amount": 123,
            "ledger_account": {
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "normality": "CREDIT",
              "account_type": {
                "value": "ASSET",
                "display_name": "Asset"
              },
              "account_subtype": {
                "value": "BANK_ACCOUNTS",
                "display_name": "Current Assets"
              }
            },
            "prepayment_account": {
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "normality": "CREDIT",
              "account_type": {
                "value": "ASSET",
                "display_name": "Asset"
              },
              "account_subtype": {
                "value": "BANK_ACCOUNTS",
                "display_name": "Current Assets"
              }
            },
            "transaction_tags": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "key": "ExampleTagKey",
                "value": "ExampleTagValue",
                "created_at": "2023-11-07T05:31:56Z",
                "updated_at": "2023-11-07T05:31:56Z",
                "deleted_at": "2023-11-07T05:31:56Z"
              }
            ],
            "memo": "<string>",
            "metadata": {
              "custom_field": "value",
              "any valid json": "below 10kb",
              "nested": {
                "meaning of life": 42,
                "array": []
              }
            }
          }
        ],
        "bill_external_id": "<string>",
        "bill_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_line_item_external_id": "<string>",
        "bill_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_payment_external_id": "<string>",
        "vendor": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "<string>",
          "individual_name": "<string>",
          "company_name": "<string>",
          "email": "<string>",
          "mobile_phone": "<string>",
          "office_phone": "<string>",
          "address_string": "<string>",
          "memo": "<string>",
          "status": "ACTIVE",
          "transaction_tags": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "key": "ExampleTagKey",
              "value": "ExampleTagValue",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "deleted_at": "2023-11-07T05:31:56Z"
            }
          ]
        },
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ExampleTagKey",
            "value": "ExampleTagValue",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z"
          }
        ],
        "memo": "<string>",
        "metadata": {
          "custom_field": "value",
          "any valid json": "below 10kb",
          "nested": {
            "meaning of life": 42,
            "array": []
          }
        }
      }
    ],
    "payments": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "payment-456",
        "refunded_amount": 123,
        "refund_processing_fee": 123,
        "completed_at": "2023-11-07T05:31:56Z",
        "method": "ACH",
        "processor": "STRIPE",
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ExampleTagKey",
            "value": "ExampleTagValue",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z"
          }
        ],
        "memo": "<string>",
        "metadata": {
          "custom_field": "value",
          "any valid json": "below 10kb",
          "nested": {
            "meaning of life": 42,
            "array": []
          }
        }
      }
    ],
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z"
      }
    ],
    "memo": "<string>",
    "metadata": {
      "custom_field": "value",
      "any valid json": "below 10kb",
      "nested": {
        "meaning of life": 42,
        "array": []
      }
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business to fetch vendor refunds for.

Query Parameters

external_id
string

Filter vendor refunds by external ID (unique idempotency key). This will always yield zero or one result.

status
enum<string>

Filter vendor refunds by status.

Available options:
SENT,
PARTIALLY_PAID,
PAID
completed_at_start
string

Filter vendor refunds by completion date. Vendor refunds completed on or after this date will be included. ISO 8601 date format.

completed_at_end
string

Filter vendor refunds by completion date. Vendor refunds completed on or before this date will be included. ISO 8601 date format.

min_amount
integer

Filter vendor refunds by minimum amount. Only vendor refunds with amounts greater than or equal to this value will be included. Must be a positive integer.

Required range: x >= 0
max_amount
integer

Filter vendor refunds by maximum amount. Only vendor refunds with amounts less than or equal to this value will be included. Must be a positive integer.

Required range: x >= 0

Response

200
application/json

List of vendor refunds

The response is of type object[].

GET
/
v1
/
businesses
/
{businessId}
/
bills
/
refunds
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/refunds \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "vendor-refund-123",
    "refunded_amount": 123,
    "status": "PAID",
    "completed_at": "2023-11-07T05:31:56Z",
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123,
        "line_items": [
          {
            "external_id": "<string>",
            "amount": 123,
            "ledger_account": {
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "normality": "CREDIT",
              "account_type": {
                "value": "ASSET",
                "display_name": "Asset"
              },
              "account_subtype": {
                "value": "BANK_ACCOUNTS",
                "display_name": "Current Assets"
              }
            },
            "prepayment_account": {
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "normality": "CREDIT",
              "account_type": {
                "value": "ASSET",
                "display_name": "Asset"
              },
              "account_subtype": {
                "value": "BANK_ACCOUNTS",
                "display_name": "Current Assets"
              }
            },
            "transaction_tags": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "key": "ExampleTagKey",
                "value": "ExampleTagValue",
                "created_at": "2023-11-07T05:31:56Z",
                "updated_at": "2023-11-07T05:31:56Z",
                "deleted_at": "2023-11-07T05:31:56Z"
              }
            ],
            "memo": "<string>",
            "metadata": {
              "custom_field": "value",
              "any valid json": "below 10kb",
              "nested": {
                "meaning of life": 42,
                "array": []
              }
            }
          }
        ],
        "bill_external_id": "<string>",
        "bill_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_line_item_external_id": "<string>",
        "bill_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_payment_external_id": "<string>",
        "vendor": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "<string>",
          "individual_name": "<string>",
          "company_name": "<string>",
          "email": "<string>",
          "mobile_phone": "<string>",
          "office_phone": "<string>",
          "address_string": "<string>",
          "memo": "<string>",
          "status": "ACTIVE",
          "transaction_tags": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "key": "ExampleTagKey",
              "value": "ExampleTagValue",
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z",
              "deleted_at": "2023-11-07T05:31:56Z"
            }
          ]
        },
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ExampleTagKey",
            "value": "ExampleTagValue",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z"
          }
        ],
        "memo": "<string>",
        "metadata": {
          "custom_field": "value",
          "any valid json": "below 10kb",
          "nested": {
            "meaning of life": 42,
            "array": []
          }
        }
      }
    ],
    "payments": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "external_id": "payment-456",
        "refunded_amount": 123,
        "refund_processing_fee": 123,
        "completed_at": "2023-11-07T05:31:56Z",
        "method": "ACH",
        "processor": "STRIPE",
        "transaction_tags": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "key": "ExampleTagKey",
            "value": "ExampleTagValue",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "deleted_at": "2023-11-07T05:31:56Z"
          }
        ],
        "memo": "<string>",
        "metadata": {
          "custom_field": "value",
          "any valid json": "below 10kb",
          "nested": {
            "meaning of life": 42,
            "array": []
          }
        }
      }
    ],
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": "2023-11-07T05:31:56Z"
      }
    ],
    "memo": "<string>",
    "metadata": {
      "custom_field": "value",
      "any valid json": "below 10kb",
      "nested": {
        "meaning of life": 42,
        "array": []
      }
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business to fetch vendor refunds for.

Query Parameters

external_id
string

Filter vendor refunds by external ID (unique idempotency key). This will always yield zero or one result.

status
enum<string>

Filter vendor refunds by status.

Available options:
SENT,
PARTIALLY_PAID,
PAID
completed_at_start
string

Filter vendor refunds by completion date. Vendor refunds completed on or after this date will be included. ISO 8601 date format.

completed_at_end
string

Filter vendor refunds by completion date. Vendor refunds completed on or before this date will be included. ISO 8601 date format.

min_amount
integer

Filter vendor refunds by minimum amount. Only vendor refunds with amounts greater than or equal to this value will be included. Must be a positive integer.

Required range: x >= 0
max_amount
integer

Filter vendor refunds by maximum amount. Only vendor refunds with amounts less than or equal to this value will be included. Must be a positive integer.

Required range: x >= 0

Response

200
application/json

List of vendor refunds

The response is of type object[].