Hello,
Is there any way to record manual payments against invoices and credit notes via the API, so to achieve this programmatically:
I’ve looked around but can’t seem to see anything that would allow this unless directly related to bank transactions.
I am attempting to tie together FreeAgent with Stripe’s method of refunding invoice items / partial invoice items as credit notes applied to the customers balance, which means some invoices automatically record payments from previous customer credit notes if they have credit/balance available, and the remainder is then billed to the customer.
Many Thanks,
Matthew
Hi Matthew,
You can indeed record manual payments against invoices and credit notes via the API.
FreeAgent works with the idea that you’ll upload bank transactions via bank statement or feed import, and then explain those bank transactions (these are red in the application when unexplained, and green when explained).
You can however create a bank transaction explanation on it’s own (a manual entry) which shows as purple in the UI.
To achieve this via the API, just POST to the Bank Transaction Explanations endpoint, making sure you set the paid_invoice
attribute to map to the credit note or invoice you’d like to explain, and then setting the bank_account
to where you’d like to create the manual bank transaction explanation.
An example request would look like this:
{ "bank_transaction_explanation":
{
"bank_account":"https://api.freeagent.com/v2/bank_accounts/123",
"dated_on":"2020-05-01",
"gross_value":"-120.0",
"paid_invoice": "https://api.freeagent.com/credit_notes/345"
}
}
Hope this helps,
Peter
1 Like
Hi Peter,
I’ve now managed to implement this and can confirm your solution works perfectly. Thanks for the help.
All the best,
Matthew