Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
payouts
/
{payoutId}
/
update
Update payout
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/payouts/{payoutId}/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paid_out_amount": 123,
  "fee": 123,
  "additional_refunds_amount": 123,
  "processor": "STRIPE",
  "completed_at": "2023-11-07T05:31:56Z",
  "payments": [
    {
      "invoice_payment_id": "efc07679-58fb-4509-9b69-05559f29b669",
      "invoice_payment_external_id": "payment-31415"
    }
  ],
  "refunds": [
    {
      "refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "refund_external_id": "<string>",
      "refund_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "refund_payment_external_id": "<string>"
    }
  ],
  "other_transactions": [
    {
      "amount": 123,
      "direction": "CREDIT",
      "account": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "description": "<string>",
      "external_id": "<string>"
    }
  ],
  "overwrite_payment_fees": true,
  "tags": [
    {
      "key": "department",
      "dimension_display_name": "Department",
      "value": "sales",
      "value_display_name": "Sales Department"
    }
  ],
  "memo": "<string>",
  "metadata": {
    "custom_field": "value",
    "any valid json": "below 1kb",
    "nested": {
      "meaning of life": 42,
      "array": []
    }
  },
  "reference_number": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "external_id": "payout-1234",
  "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paid_out_amount": 123,
  "fee": 123,
  "processor": "STRIPE",
  "imported_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "match": {
    "id": "6b0a3734-f4ef-4fb0-9fc1-3f59b0c1cf99",
    "match_type": "PAYOUT",
    "bank_transaction": {
      "type": "Bank_Transaction_Data",
      "id": "a703c8d6-cfe8-453d-a275-b92eacc6fc6e",
      "business_id": "738ec216-e8e5-48f2-b7f2-cdc89c96b3d4",
      "source": "STRIPE",
      "source_transaction_id": "trxn_1sdOeLQiFAKE2LQBkcvrJw95f",
      "source_account_id": "738ec216-e154-48f2-1111-cdc89c96b3d4",
      "imported_at": "2024-03-19T22:09:53.290591Z",
      "date": "2024-03-06T06:06:40Z",
      "direction": "CREDIT",
      "amount": 87459,
      "counterparty_name": null,
      "description": "Payout (po_1OqnTHISISFAKEiTVBkCiyAERwm)",
      "account_name": "Layer Banking",
      "categorization_status": "MATCHED"
    },
    "details": {
      "type": "Payout_Match",
      "id": "d224508b-b05e-41da-89de-0fbd8a573507",
      "amount": 87459,
      "date": "2024-03-06T00:00:00Z",
      "description": "Payout from STRIPE",
      "adjustment": null
    }
  },
  "payments": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "payment-1",
      "at": "2023-11-07T05:31:56Z",
      "method": "CASH",
      "fee": 123,
      "prepayment_account": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "payment_clearing_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"
        }
      },
      "additional_fees": [
        {
          "fee_amount": 123,
          "description": "<string>",
          "account": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          },
          "is_passed_to_customer": true
        }
      ],
      "amount": 123,
      "processor": "STRIPE",
      "imported_at": "2023-11-07T05:31:56Z",
      "allocations": [
        {
          "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "amount": 123,
          "transaction_tags": [
            {
              "id": "<any>",
              "key": "<any>",
              "dimension_display_name": "<any>",
              "value": "<any>",
              "value_display_name": "<any>",
              "dimension_id": "<any>",
              "definition_id": "<any>",
              "archived_at": "<any>"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "refund_allocations": [],
      "payouts": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "payout-1234",
          "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "paid_out_amount": 123,
          "fee": 123,
          "processor": "STRIPE",
          "imported_at": "2023-11-07T05:31:56Z",
          "completed_at": "2023-11-07T05:31:56Z",
          "match": {
            "id": "6b0a3734-f4ef-4fb0-9fc1-3f59b0c1cf99",
            "match_type": "PAYOUT",
            "bank_transaction": {
              "type": "Bank_Transaction_Data",
              "id": "a703c8d6-cfe8-453d-a275-b92eacc6fc6e",
              "business_id": "738ec216-e8e5-48f2-b7f2-cdc89c96b3d4",
              "source": "STRIPE",
              "source_transaction_id": "trxn_1sdOeLQiFAKE2LQBkcvrJw95f",
              "source_account_id": "738ec216-e154-48f2-1111-cdc89c96b3d4",
              "imported_at": "2024-03-19T22:09:53.290591Z",
              "date": "2024-03-06T06:06:40Z",
              "direction": "CREDIT",
              "amount": 87459,
              "counterparty_name": null,
              "description": "Payout (po_1OqnTHISISFAKEiTVBkCiyAERwm)",
              "account_name": "Layer Banking",
              "categorization_status": "MATCHED"
            },
            "details": {
              "type": "Payout_Match",
              "id": "d224508b-b05e-41da-89de-0fbd8a573507",
              "amount": 87459,
              "date": "2024-03-06T00:00:00Z",
              "description": "Payout from STRIPE",
              "adjustment": null
            }
          },
          "transaction_tags": [
            {
              "id": "<any>",
              "key": "<any>",
              "dimension_display_name": "<any>",
              "value": "<any>",
              "value_display_name": "<any>",
              "dimension_id": "<any>",
              "definition_id": "<any>",
              "archived_at": "<any>"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "transaction_tags": [],
      "memo": "<string>",
      "metadata": {
        "custom_field": "value",
        "any valid json": "below 1kb",
        "nested": {
          "meaning of life": 42,
          "array": []
        }
      },
      "reference_number": "<string>"
    }
  ],
  "refunds": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "31415926535",
      "refunded_amount": 123,
      "status": "PAID",
      "completed_at": "2023-11-07T05:31:56Z",
      "is_dedicated": true,
      "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>",
            "memo": "<string>",
            "status": "ACTIVE",
            "transaction_tags": [
              {
                "id": "<any>",
                "key": "<any>",
                "dimension_display_name": "<any>",
                "value": "<any>",
                "value_display_name": "<any>",
                "dimension_id": "<any>",
                "definition_id": "<any>",
                "archived_at": "<any>"
              }
            ]
          },
          "transaction_tags": [
            {
              "id": "<any>",
              "key": "<any>",
              "dimension_display_name": "<any>",
              "value": "<any>",
              "value_display_name": "<any>",
              "dimension_id": "<any>",
              "definition_id": "<any>",
              "archived_at": "<any>"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "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",
          "payment_clearing_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"
            }
          },
          "refunded_payment_fees": [
            {
              "account": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "description": "<string>",
              "fee_amount": 123
            }
          ],
          "transaction_tags": [
            {
              "id": "<any>",
              "key": "<any>",
              "dimension_display_name": "<any>",
              "value": "<any>",
              "value_display_name": "<any>",
              "dimension_id": "<any>",
              "definition_id": "<any>",
              "archived_at": "<any>"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "payouts": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "external_id": "payout-1234",
          "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "paid_out_amount": 123,
          "fee": 123,
          "processor": "STRIPE",
          "imported_at": "2023-11-07T05:31:56Z",
          "completed_at": "2023-11-07T05:31:56Z",
          "match": {
            "id": "6b0a3734-f4ef-4fb0-9fc1-3f59b0c1cf99",
            "match_type": "PAYOUT",
            "bank_transaction": {
              "type": "Bank_Transaction_Data",
              "id": "a703c8d6-cfe8-453d-a275-b92eacc6fc6e",
              "business_id": "738ec216-e8e5-48f2-b7f2-cdc89c96b3d4",
              "source": "STRIPE",
              "source_transaction_id": "trxn_1sdOeLQiFAKE2LQBkcvrJw95f",
              "source_account_id": "738ec216-e154-48f2-1111-cdc89c96b3d4",
              "imported_at": "2024-03-19T22:09:53.290591Z",
              "date": "2024-03-06T06:06:40Z",
              "direction": "CREDIT",
              "amount": 87459,
              "counterparty_name": null,
              "description": "Payout (po_1OqnTHISISFAKEiTVBkCiyAERwm)",
              "account_name": "Layer Banking",
              "categorization_status": "MATCHED"
            },
            "details": {
              "type": "Payout_Match",
              "id": "d224508b-b05e-41da-89de-0fbd8a573507",
              "amount": 87459,
              "date": "2024-03-06T00:00:00Z",
              "description": "Payout from STRIPE",
              "adjustment": null
            }
          },
          "transaction_tags": [
            {
              "id": "<any>",
              "key": "<any>",
              "dimension_display_name": "<any>",
              "value": "<any>",
              "value_display_name": "<any>",
              "dimension_id": "<any>",
              "definition_id": "<any>",
              "archived_at": "<any>"
            }
          ],
          "memo": "<string>",
          "metadata": {
            "custom_field": "value",
            "any valid json": "below 1kb",
            "nested": {
              "meaning of life": 42,
              "array": []
            }
          },
          "reference_number": "<string>"
        }
      ],
      "transaction_tags": [
        {
          "id": "<any>",
          "key": "<any>",
          "dimension_display_name": "<any>",
          "value": "<any>",
          "value_display_name": "<any>",
          "dimension_id": "<any>",
          "definition_id": "<any>",
          "archived_at": "<any>"
        }
      ],
      "memo": "<string>",
      "metadata": {
        "custom_field": "value",
        "any valid json": "below 1kb",
        "nested": {
          "meaning of life": 42,
          "array": []
        }
      },
      "reference_number": "<string>"
    }
  ],
  "transaction_tags": [
    {
      "id": "<any>",
      "key": "<any>",
      "dimension_display_name": "<any>",
      "value": "<any>",
      "value_display_name": "<any>",
      "dimension_id": "<any>",
      "definition_id": "<any>",
      "archived_at": "<any>"
    }
  ],
  "memo": "<string>",
  "metadata": {
    "custom_field": "value",
    "any valid json": "below 1kb",
    "nested": {
      "meaning of life": 42,
      "array": []
    }
  },
  "reference_number": "<string>"
}

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 update the payout for

payoutId
string
required

The UUID of the payout to update

Body

application/json
paid_out_amount
integer

The amount of the payout, in cents.

fee
integer

The platform fee associated with the payout. Express as a positive amount.

additional_refunds_amount
integer

The amount of additional refunds associated with the payout, in cents. Express in positive amounts.

processor
enum<string>

Processor used to make the payment, if any. Any processor name can be provided and will be tracked.

Available options:
STRIPE,
PAYPAL,
SHOPIFY,
ADYEN,
RAINFOREST
completed_at
string<date-time>

Timestamp of when the payout was completed

payments
(Reference existing payment · object | Create new payment and invoice · object)[]

List of invoice payments to associate with the payout. Can refer to existing payments by ID or external ID. Alternatively, you can create new payments by specifying the payment amount and payment external ID.

  • Reference existing payment
  • Create new payment and invoice
refunds
(Reference existing refund payment · object | Create new refund with payment · object)[]

List of refund payments to associate with the payout. Can refer to existing payments by ID or external ID, or by their refund's ID or external ID (so long as said refund has exactly one payment). Alternatively, you can create new refund payments by specifying the refund amount and refund external ID.

  • Reference existing refund payment
  • Create new refund with payment
other_transactions
object[]

A list of other transactions associated with the payout

overwrite_payment_fees
boolean

Whether or not to overwrite the fees on the payments associated with the payout. If false, the fees on the payments will be preserved. If true, the fees on the payments will be overwritten with the fees provided in the payments array.

tags
object[]

A list of tags associated with the payout

memo
string | null

Memo for any text you would like to associate with the payout (for example, to display to end users).

metadata
object

Arbitrary custom metadata in JSON format with a size limit of 1KB

Example:
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}
reference_number
string | null

Any (typically user-visible) identifier you would like to associate with the payout. Can be used to filter when listing payouts.

Response

id
string<uuid>

Unique ID for the Payout. Idempotency key.

external_id
string | null

Unique ID of the payout in your system for linking purposes.

Example:

"payout-1234"

business_id
string<uuid>

ID of the Business that generated the payout.

paid_out_amount
integer

The amount of the payout, in cents

fee
integer

The platform fee associated with the payout

processor
enum<string>

Processor used to make the payment, if any. If not null, every payment or refund associated with the payout must have the same processor

Available options:
STRIPE,
PAYPAL,
SHOPIFY,
ADYEN,
RAINFOREST
imported_at
string<date-time>

Timestamp of when the payout was imported

completed_at
string<date-time>

Timestamp of when the payout was completed

match
object

The transaction match associated with the payout

payments
object[]

A list of invoice payments associated with the payout

refunds
object[]

A list of refunds associated with the payout

transaction_tags
object[]

A list of tags associated with the payout

memo
string | null

Memo for any text you would like to associate with the payout (for example, to display to end users).

metadata
object

Arbitrary custom metadata in JSON format with a size limit of 1KB

Example:
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}
reference_number
string | null

Any (typically user-visible) identifier you would like to associate with the payout. Can be used to filter when listing payouts.