Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Post Bank Transaction via API

Started by Matthew Salter -   in API Authentication

I am trying to create an API link between Klarna & Xero via API.

I already have the data exported via API from Klarna & am now trying to POST a Bank Transaction into Xero.

I have already worked through the Bank Transactions API examples given in the Xero Developers portal: https://developer.xero.com/documentation/api/banktransactions

I have written a PHP script which passes the above in xml format:
(however I'm getting an Error for "ContactID")

<Description>Yearly Bank &amp; Account Fee</Description>
<Code>Scar Tissue Klarna K502223</Code>

I have looked at the topic on "Contact_ID" on the developer portal: https://developer.xero.com/documentation/api/contacts#

I'm unable to get the API working and get the error:
Error: 10 ValidationException A validation exception occurred The specified bank account details does not match a known bank account. 0580a68c-0a54-4372-8590-74f656b3b377 ABC 2019-03-15T10:36:29 AUTHORISED Inclusive Yearly Bank & Account Fee 20.00 NONE 0.00 20.00 404 1.0000 20.00 0.00 20.00 GBP 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000 Scar Tissue Klarna K502223 SPEND false