Skip to content

External Sales Invoice Payments

Manage payments for external sales invoices in Moneybird.

Working with External Sales Invoice Payments

This section covers how to interact with Moneybird’s External Sales Invoice Payments API. These payments represent money received for external sales invoices.

Basic Operations

Create a Payment for an External Sales Invoice

Register a payment for an external sales invoice.

$externalSalesInvoiceId = '123456789';
$data = [
'payment_date' => '2025-02-28',
'price' => '100.00',
'financial_account_id' => '987654321',
'ledger_account_id' => '123123123',
'transaction_identifier' => 'TRANSACTION123'
];
$payment = $client->externalSalesInvoicePayments()->createForExternalSalesInvoiceId(
$externalSalesInvoiceId,
$data
);
echo "Payment ID: " . $payment->id;

Delete a Payment for an External Sales Invoice

Remove a payment from an external sales invoice.

$externalSalesInvoiceId = '123456789';
$paymentId = '987654321';
$client->externalSalesInvoicePayments()->deleteForExternalSalesInvoiceId(
$externalSalesInvoiceId,
$paymentId
);

Payment Properties

When working with external sales invoice payments, you’ll have access to the following properties:

PropertyTypeDescription
idstringUnique identifier for the payment
administration_idstringID of the administration the payment belongs to
invoice_typestringType of invoice (always “ExternalSalesInvoice” for these payments)
invoice_idstringID of the external sales invoice the payment is for
financial_account_idstringID of the financial account the payment was made to
user_idintID of the user who created the payment
payment_transaction_idstringID of the payment transaction
transaction_identifierstringExternal identifier for the transaction
pricestringAmount of the payment
price_basestringBase amount of the payment (before currency conversion)
payment_datestringDate the payment was made (YYYY-MM-DD)
credit_invoice_idstringID of the credit invoice if this payment is related to a credit
financial_mutation_idstringID of the related financial mutation
ledger_account_idstringID of the ledger account the payment is booked to
linked_payment_idstringID of a linked payment
manual_payment_actionstringDescription of any manual payment action
created_atstringTimestamp when the payment was created
updated_atstringTimestamp when the payment was last updated

Further reading