Connect Magento to Twinfield: orders and credit memos as a sales transaction with payment reference
Magento shops often sell to businesses or from several store views, and then two things matter in the books: who has to pay when, and which store the revenue belongs to. Twinfield has fields for that, such as period, due date and payment reference, but Magento supplies them spread across orders and credit memos. Schakel reads those from your Magento 2 and books them as a sales transaction in Twinfield, with an integration token that may only see the parts you point to.
All Magento integrationsAll Twinfield integrations
What travels across the link
Everything this connector moves between Magento and Twinfield, and how often.
-
Integration token with its own rights
In the Magento admin you create an integration under System and Integrations and choose which resources it may use. For this connector, access to sales and credit memos is enough. You get a token for it and do not have to share an admin password.
-
Orders with period and due date
An order becomes a sales transaction with the order date as the transaction date. Twinfield derives the period (year and period number) from that date itself. The due date follows from the payment term you set, which makes the difference in your open items for business customers.
-
Payment reference and invoice number
In Twinfield the invoice number may be at most 40 characters and the payment reference 50. Schakel uses the Magento invoice number if there is one, and otherwise the order number. That way your bank or collection process finds the right open item.
-
Credit memos as a reversed transaction
A credit memo in Magento arrives as a sales transaction with reversed sides for the amount of the credit memo, so a partial return is correct too. A transaction that is still provisional can still be deleted in Twinfield; a final one cannot.
-
How Magento and Twinfield talk
Magento 2 has a REST API with a search on orders and a separate resource for credit memos, reachable with an integration token. Twinfield signs in via login.twinfield.com and accepts transactions via the ProcessXml service on the cluster address of your organisation. Both sides are synchronous; Schakel polls for what is new.
-
Worked example (fictional)
Example: a business order of 500.00 excl. with 21% VAT on 14 October and a payment term of 30 days becomes a transaction with total 605.00, revenue 500.00 and VAT 105.00, with 13 November as the due date. A credit memo of 100.00 excl. becomes a counter transaction of 121.00 incl. The amounts are invented.
Where each Magento field ends up in Twinfield
Period, due date and references in particular matter for Magento shops.
Order
increment_id of the order
invoicenumber, at most 40 characters
Order date
created_at
date; Twinfield derives the period (YYYY/PP) from it
Payment term
Payment method or customer group
duedate of the transaction
Payment reference
Invoice number or order number
paymentreference, at most 50 characters
Customer
Billing address, company and VAT number
Debtor in dim2 on the total line
Order line
items with sku, quantity and price excl. VAT
Detail line on the revenue account
Store view
store_id of the order
Cost centre on the detail line, if you set that
Credit memo
creditmemos with lines and amount
Sales transaction with reversed sides
What Magento to Twinfield saves you
- Business customers appear with the right due date in your open items.
- You can report revenue separately per store view in Twinfield.
- You share a token with limited rights, never an admin password.
- Partial returns are correct, because the connector follows the credit memo.
Setting it up
- 01
Create an integration in Magento
In the Magento admin you go to System and Integrations, create an integration, give access to sales and credit memos and activate it. You copy the access token into Schakel.
- 02
Grant access to Twinfield
You sign in to Twinfield, give permission and choose the office the transactions go into.
- 03
Choose journal, accounts and payment term
You give the sales journal, the revenue account, the VAT codes and the default payment term. Per store view you can pass a cost centre of your own.
- 04
Check and let it run
The first transactions stay provisional so you can review them. After that new orders and credit memos keep flowing.
What you need
- A Magento 2 shop with an integration that has access to sales and credit memos
- A Twinfield administration with a sales journal, revenue accounts and VAT codes
Where it runs
Inside your Shopify admin, as an app. You sign in through Shopify, no separate account.
Then from €10 a month billed yearly, or stay on free. See the tiers
Start freeNeed this exact integration, or something it does not do yet? Tell us what you need and we reply within 24 hours.
Related connections
Connect a different pair
Magento and Twinfield is one of many. Pick two systems and see what travels between them.
Common questions
Is the Magento to Twinfield connector available?
Request this connector and get access. You let us know you want to link Magento to Twinfield, and we make sure you can get started. You hear from us within 24 hours.
Which rights does the Magento integration need?
Access to sales and to credit memos is enough. You choose the resources when creating the integration. If one is missing, Magento reports that access is denied; adjust the integration’s rights and try again.
How does the period in Twinfield come about?
Schakel passes the order date and leaves the period field empty. Twinfield then derives the period from the date itself.
Can I let B2B customers run on account?
Yes. You set a payment term and Schakel puts the due date on the transaction.
What happens to orders from several store views?
They flow through one connector and you can give each store view a cost centre. Everything is then in one office and you can still report per store.
Is stock or product data written back to Magento?
No. Schakel reads orders and credit memos and books them in Twinfield. Your Magento catalogue and stock are left untouched.
Can you connect Magento to Twinfield?
Yes. Schakel connects through the official APIs of Magento and Twinfield, so you install nothing on your own server and nothing travels outside those two parties.
Which VAT rate do my sales get in Twinfield?
The rate is set per line: 21%, 9% or 0%. Sales to Belgium and other EU countries get the rate of the destination country, ready for your OSS return.
Missing something you need?
Tell us what Magento and Twinfield should do for you. If it is not in here yet, that is usually because nobody has asked. We reply within 24 hours.