Hi Sanjib,
The issue here is that you need to tell FreeAgent how much of the $200
invoice the bank transaction explanation’s gross value (in GBP) is paying.
You need to use foreign_currency_value
to do this. Using current exchange
rates, you’d be looking at something like:
{
“bank_transaction_explanation”:
{
“bank_account”:"
https://api.freeagent.com/v2/bank_accounts/265078",
“dated_on”:“2014-02-18”,
“description”:"Invoice receipt against Invoice ",
“gross_value”: “120.40”, // this is the amount of GBP actually
received in payment
“foreign_currency_value”:“200.00”, // this is the value in USD
“paid_invoice”:“https://api.freeagent.com/v2/invoices/8255544”
}
}
Hope this helps.
-JOn Tue, Mar 11, 2014 at 11:36 AM, Sanjib Chakraborty < sanjibc.primalink@gmail.com> wrote:
Hi Jonathan,
thanks for your reply,
here is my request body in json format, please have a look.
{
“bank_transaction_explanation”:
{
“bank_account”:"
https://api.freeagent.com/v2/bank_accounts/265078",
“dated_on”:“2014-02-18”,
“description”:"Invoice receipt against Invoice ",
“gross_value”:“200.00”,
“paid_invoice”:“https://api.freeagent.com/v2/invoices/8255544”
}
}
Thanks again
Sanjib
On Tuesday, March 11, 2014 4:22:08 PM UTC+5:30, Sanjib Chakraborty wrote:
Hi,
I’m trying to make payment using POST request to httpshttps://api.freeagent.com/v2/bank_transaction_explanations
://api.freeagent.com/v2/bank_transaction_explanations and setting my
invoice in “paid_invoice”.
The Currency of the invoice amount is in “Sterling Pound” and the default
currency of the account is in “USD”, the response I get from the API is
201-Created but Payment status in freeagent account is not updated as
“Paid”, its showing "Open – £256.00 due in 26 days ".
But if both currencies are same then its showing Paid, as expected.
Sanjib
–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.
Jonathan Barrett, Senior Engineer
FreeAgent: Accounting software, simplified
+44 (0)131 447 0011
Follow us on Twitter: @freeagent https://twitter.com/freeagent
FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774