Problem making payment in freeagent api for multiple currency

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

Hi Jonathan,
thank you very much for your help, but the problem is that our system only
allows currency in “Pound”, and invoices which have currencies in pound
will only be downloaded in our system, thus payment to those invoices will
be a issue if the user has other than “Pound” in his default currency in
FreeAgent.

looking for your further help
SanjibOn 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

Hi Sanjib,

Thanks for that. FreeAgent allows users to choose non GBP base currencies
when they set up their accounts, and this currency will be expected when
creating items with monetary values via the API.

The base currency of the company can be discovered by looking at the company
resourcehttps://dev.freeagent.com/docs/company#general-company-informationwhen your app connects to an account, and you’ll need to make sure you pass
through the total of any non-base currency invoice (as its foreign_currency_value<https://dev.freeagent.com/docs/bank_transaction_explanations#create-a-bank-transaction-explanation>)
when making a payment. Otherwise, FreeAgent will not know how much of your
$150 invoice a payment of £90 is intended to pay off.

Hope this helps,

-J

Hi Sanjib,

Can you show me an example of the query you’re submitting, please?

Cheers,

-JOn Tue, Mar 11, 2014 at 10:52 AM, Sanjib Chakraborty < sanjibc.primalink@gmail.com> 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

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

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
SanjibOn 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