In order to register payments in economics, remote payment registration needs to be chosen in Sales settings. If you haven't done so, you can find a guide here.
When payment registration has been set up to "remote", payments needs to be registered through economic. This is done automatically when a customer makes a payment. In order for it to work, the customer needs to add the prepayment number on the transfer.
Before the information is synced from economic to Traede, we need to set up the connection through webhooks.
Generate a password key
The connection requires a unique password key that can be generated using a password manager or similar. You can find one on the internet e.g. LastPass. Make sure it's only using alphabetic uppercase and lowercase characters, and numbers. I should look something like this: lRDZHhERD6s2Mt48.
Add the password key to Traede
We need to add this newly generated password key to Traede.
- Go into Traede
- Choose App Store and economic in the dropdown
- Select the Settings tab
- Find the webhook data field and enter the password key
- Click save settings at the very bottom of the page
Find your unique brand id in Traede
To set up the connection to economic you need to find your unique brand id in Traede.
- Go into your B2B Webshop in Traede
- Find the unique id in your browser's address field
Set up economic to sync. payments
The next step is to set up the password key and webhooks in economic.
- In economic click on Alle indstillinger
- Find and click on Webhooks in the left menu
- Click Nyt webhook
- Fill out the data with the information below
- Type: Faktura bogført
- Name: Invoiced was booked
- URL: https://api.traede.com/economic/webhooks/10919/invoice-booked
- Content-type: application/json
- Data: Use the code below
{"invoice_number":[INVOICENO],"secret":"INSERT WEBHOOK SECRET HERE"}
Remember to change the 10919 number to your unique brand id and replace the text "Insert webhook secret here". with your generated password key.
- To save it all click Gem og ny as we need to create one more
- For the next webhook add the data below
- Type: Kassekladde bogført
- Name: Journal was booked
- URL: https://api.traede.com/economic/webhooks/10919/journal-booked
- Content-type: application/json
- Data: Use the code below
{"day_book_number":[DAYBOOKNO],"from_serial_number":[FROMSERIALNO],"to_serial_number":[TOSERIALNO],"secret":"INSERT WEBHOOK SECRET HERE"}
Remember to change the 10919 number to your unique brand id and replace the text "Insert webhook secret here". with your generated password key.
Payment registered in economic
Now that the connection has been made a payment that is registered in economic will be synced to Traede. It's important that payment by the customer has the prepayment number in the text field, otherwise, the payment won't be registered in Traede.
Add some information in the footer of the prepayment document that describes the customer should add the prepayment number to the payment.
The code {{ prepayment_number }} can be used to display.