PATCH
/
v1
/
businesses
/
{businessId}
/
invoices
/
payments
/
{paymentId}
curl --request PATCH \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/invoices/payments/{paymentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "external_id": "Unique ID of the invoice payment in an external system for linking and idempotency.",
  "paid_at": "2023-11-07T05:31:56Z",
  "amount": 123,
  "fee": 123,
  "additional_fees": [
    {
      "fee_amount": 123,
      "description": "<string>",
      "account": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    }
  ],
  "method": "CASH",
  "processor": "STRIPE",
  "dedicated_refunds": [
    {
      "external_id": "31415926535",
      "refunded_amount": 123,
      "account_identifier": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "completed_at": "2023-11-07T05:31:56Z",
      "refund_processing_fee": 123,
      "method": "CASH",
      "processor": "<string>",
      "refunded_payment_fees": [
        {
          "account": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          },
          "description": "<string>",
          "fee_amount": 123
        }
      ],
      "tags": [
        {
          "key": "Location",
          "value": "MainStreet"
        }
      ],
      "metadata": {
        "custom_field": "value",
        "any valid json": "below 10kb",
        "nested": {
          "meaning of life": 42,
          "array": []
        }
      }
    }
  ],
  "tags": [
    {
      "key": "Location",
      "value": "MainStreet"
    }
  ],
  "metadata": {
    "custom_field": "value",
    "any valid json": "below 10kb",
    "nested": {
      "meaning of life": 42,
      "array": []
    }
  }
}'
{
  "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"
        }
      ],
      "metadata": {
        "custom_field": "value",
        "any valid json": "below 10kb",
        "nested": {
          "meaning of life": 42,
          "array": []
        }
      }
    }
  ],
  "refund_allocations": [],
  "transaction_tags": [],
  "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.

Path Parameters

businessId
string
required

The UUID of the business to update the invoice payment for

paymentId
string
required

The UUID of the invoice payment to update

Body

application/json

An object containing a subset of Payment object fields used to update an existing Payment

Response

200
application/json

OK

The response is of type object.