Jump to content

Issues transferring between accounts with foreign currency using the API


 Share

Recommended Posts

Hello, I was wondering if there is a way to record a transfer between two accounts, when one or both are foreign currency accounts, using the API?

Using Journals endpoint I get the following error message: 

"validation": { "errors": [ { "field": "journal_lines.foreign_currency.currency_debit", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.currency_credit", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.exchange_rate", "message": "This field is required." }, { "field": "journal_lines.foreign_currency.exchange_rate", "message": "is not a number" } ] }

If I try with Bank Transfers I get:

"validation": { "errors": [ { "field": "", "message": "You cannot make the bank transfer for foreign currency via api." } ] }

Any ideas? Thanks!

Link to comment
Share on other sites

Hi @Railz Dev,

Thank you for your post.

Sage Business Cloud Accounting resolves all foreign currencies to the businesses base currency meaning you cannot transfer amounts between two bank accounts which use currency different to that of the business base currency.

You'd need to make two separate transfers, one from the first non base bank account to a bank account with the same base currency as the business and then a second from the base currency bank account to the other non base bank account with the relevant exchange rates.

Thanks 

Mark

Screenshot 2024-04-08 at 08.23.22.png

Link to comment
Share on other sites

Hi @Railz Dev,

It is possible via a journal transaction using body params as per the example below.

 

{
  "journal": {
    "date": "2024-04-15",
    "reference": "Multi Currency Transfer",
    "description": "Multi Currency Transfer",
    "total": "100",
    "journal_lines": [
        {
            
            "ledger_account_id": "d47fbc695161427b9d579d92020c2d1b",
            "details": "Money In to Dollar Account",
            "debit": "100.0",
            "credit": "0.0",
            "journal_line_foreign_currency":{
                "currency_debit":"121.46",
                "currency_credit":"0.00",
                "exchange_rate": "1.2145675946"
            }
        },
        {
            "ledger_account_id": "ccd4db18df44421bbdc93e18ab1427b7",
            "details": "Money Out of Euro Account",
            "debit": "0.0",
            "credit": "100.0",
            "journal_line_foreign_currency":{
                "currency_credit":"112.75",
                "currency_debit":"0.0",
                "exchange_rate": "1.127522832"
            }
        }
    ]
  }
}

Thanks

Mark

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...