Invoice Payments
Update payment
Businesses
- Business
- Financial Accounts
- Documents
- Scoped Authentication
- Configuration
- Tasks & Notifications
Financial Activity
- Accounts Receivable
- Customers
- Invoices
- Invoice Payments
- Payouts
- Refunds
- Write Offs
- Customer Credits
- Accounts Payable
- Bank Transactions
- General Ledger
- Tags
Accounting Reports
- Profit and Loss
- Balance Sheet
- Cash Flow Statement
Platform Configuration
- Plaid
- SMS
Activity Metrics
- Platform wide activity
- Business Activity
Invoice Payments
Update payment
Update an invoice payment. Updates to information such as the amount or time will cause reversal of previous journal entries and creation of new entries.
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The UUID of the business to update the invoice payment for
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
.
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": []
}
}
}