POST
/
v1
/
businesses
/
{businessId}
/
payouts
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/payouts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "external_id": "payout-1234",
  "paid_out_amount": 123,
  "fee": 123,
  "additional_refunds_amount": 0,
  "processor": "STRIPE",
  "completed_at": "2023-11-07T05:31:56Z",
  "payments": [
    {
      "invoice_payment_external_id": "payment-31415",
      "amount": 123,
      "fees": [
        {
          "fee_amount": 123,
          "description": "<string>",
          "account": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        }
      ],
      "payment_paid_at": "2023-11-07T05:31:56Z"
    }
  ],
  "refunds": []
}'
{
  "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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "match_type": "TRANSFER",
    "bank_transaction": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "source": "UNIT",
      "source_transaction_id": "g4DlKyjXqGH3Kp5XlaWMtwLRrE4Z9AiE8B4Ko",
      "source_account_id": "Aaoy8G7VXZHVeqNoL1GvcmkPdqpLRWi9NArdG",
      "imported_at": "2023-11-07T05:31:56Z",
      "date": "2023-11-07T05:31:56Z",
      "direction": "CREDIT",
      "amount": 123,
      "counterparty_name": "WeWork",
      "description": "WeWork monthly rent payment",
      "account_name": "Plaid Checking",
      "categorizationStatus": "PENDING"
    },
    "details": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123,
      "date": "2023-11-07T05:31:56Z",
      "description": "Transfer from SavingsAccount to CheckingAccount"
    }
  },
  "payments": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "payment-1",
      "at": "2023-11-07T05:31:56Z",
      "method": "CASH",
      "fee": 123,
      "additional_fees": [
        {
          "fee_amount": 123,
          "description": "<string>",
          "account": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        }
      ],
      "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": "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": []
    }
  ],
  "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"
    }
  ]
}

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 create a payout for

Body

application/json
external_id
string
required

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

Example:

"payout-1234"

paid_out_amount
integer
required

The amount of the payout, in cents. This amount can be negative if refunds and fees exceed payments.

fee
integer
required

The platform fee associated with the payout. Should be expressed as a positive value.

processor
enum<string>
required

Processor used to make the payment.

Available options:
STRIPE,
PAYPAL
completed_at
string
required

Timestamp of when the payout was completed

payments
object[]
required

List of payments to associate with the payout

additional_refunds_amount
integer
default:0

The amount of additional refunds associated with the payout, in cents. This should only be used when refunds cannot be individually itemized in the refunds array. Should be expressed as a positive value.

refunds
object[]

List of refunds to associate with the payout

Contains details for initiating a refund in a payout transaction. It includes an external identifier and the refund amount.

Response

200
application/json
Payout has been successfully updated or unchanged.
id
string

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

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. Any processor name can be provided and will be tracked. Supported processors (STRIPE, SHOPIFY) will have additional asset balance tracking.

Available options:
STRIPE,
PAYPAL
imported_at
string

Timestamp of when the payout was imported

completed_at
string

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

transaction_tags
object[]

A list of tags associated with the payout