Skip to main content

PrestaShop – How PrestaShop document sync with Holded works

New behaviour for PrestaShop document sync with Holded

Written by Natalia López

☝🏼 Before you start

Orders that already had documents in Holded before activation keep the previous behaviour for their whole lifetime. The new behaviour applies to orders that come in from now on.

Holded automatically syncs the orders from your PrestaShop store and creates the corresponding accounting documents. You don’t need to create or fix anything manually.

When an order that has already been invoiced changes, we don’t rewrite the invoice. Instead, we issue a new document that includes only what has changed. The total of all documents for an order always matches what that order is worth in PrestaShop at any given time.

You can review the previous behaviour in the article PrestaShop: sales sync – FAQ.

The two rules behind everything else

  1. The original invoice is never touched. A document that has already been issued and reported to the Spanish Tax Agency (Agencia Tributaria) can’t be modified or deleted. Every correction is a new document, linked to the original.

  2. Each document includes only the difference. If you add a product, we issue the added product. If a product is returned, we issue that product as a negative amount. We never reissue the whole order.

Corrective invoice or credit note: in Holded you’ll always see “corrective invoice”

In Holded, every document that corrects an invoice is called a corrective invoice, whether you’re refunding money or the customer is paying more. What changes is the sign of the amount:

  • Negative corrective invoice: when money goes back to the customer, such as a return or a refund. In accounting, this is usually called a credit note.

  • Positive corrective invoice: when money comes in because the order’s value goes up. You add a product, a price goes up, or the customer switches to a more expensive product.

We deliberately use the same document type in both cases. This way, all of an order’s documents are linked to each other and to the original invoice, and you can follow the entire order from any of them.

What’s different from before?

Before

Now

Editing an invoiced order created a corrective invoice for the order total plus a new document with the updated order

A single document is created with the difference

If the “Approve documents automatically” option wasn’t enabled, documents arrived as drafts

Invoices and receipts are always issued already approved. That option no longer applies to new orders

If you edited a synced order in Holded, the sync could overwrite your changes

An issued invoice is never rewritten; every change to the order in PrestaShop arrives as a corrective invoice

What does Holded issue in each case?

This table summarises the behaviour when your store syncs orders as an invoice or sales receipt. The following sections explain each case with an example.

What happens in PrestaShop

What Holded issues

When

An order changes to a status configured as paid (for example, Payment accepted)

One document with all the order lines, already approved and with the payment

When the order syncs

An order changes to a status configured as pending

One document, already approved, pending payment

When the order syncs

The order later changes to a paid status

No new document: the payment is recorded on the existing document

When the status changes

You add a product or raise a price

A corrective invoice with only the difference

When the order is saved

You remove units or lower a price

A negative corrective invoice for the difference

When the order is saved

You refund part of the order

A negative corrective invoice for the refunded products

When the refund is recorded

You refund the entire order

A corrective invoice that brings the order to zero

When the refund is recorded

The customer exchanges one product for another

A single document with the returned product and the new one

When the order is saved

You change the shipping status or address

No document

—

PrestaShop resends an order with no changes, or an old notification

No document

—

How does Holded detect changes in PrestaShop?

PrestaShop doesn’t send a specific notification when you process a return. Every time you modify or refund an order, PrestaShop sends the full order again with its current quantities and amounts. Holded compares it with what has already been issued and creates a document with only the difference.

  • Products with a reference (SKU) are identified by their reference. If you change the price or quantity of a product, the corrective invoice includes only the difference for that product.

  • Lines without a reference (shipping, discounts or products without a reference) are identified by their content. If they change, you’ll see the full old line as a negative amount and the full new line as a positive amount. This prevents totals from going out of balance.

  • Holded uses the order’s last-modified date in PrestaShop. If a notification arrives that’s older than the last one already processed, it’s discarded.

☝🏼 For sync and stock to work correctly, we recommend that all your products have the same reference (SKU) in PrestaShop and in Holded.

When is the document for a new order created?

We create a single document (invoice, sales receipt or sales order, depending on your store’s settings) with all the order lines: products, shipping and discounts.

Invoices and sales receipts are issued already approved. They don’t go through a draft stage.

You decide which statuses create a document in Settings > Integrations > PrestaShop > Settings > Sales sync > Advanced sync > Configure order statuses. For each status, you choose whether the invoice should be marked as paid or pending.

Situation

What happens

The order status is configured as paid

The document is created, already approved and with the payment

The order status is configured as pending

The document is created, already approved and pending payment

The order status isn’t in your settings

Nothing is created until the order changes to a configured status

You haven’t configured any statuses

PrestaShop’s standard statuses are used; only Payment accepted and Remote payment accepted count as paid

Your store issues sales orders

It’s created and updated with every change to the order

Date and numbering. If the order has an invoice in PrestaShop, the document takes that invoice’s date; otherwise, it takes the order date. With the Use invoice number option enabled, the document keeps PrestaShop’s numbering (for example, #FA000054 is imported as 54). With it disabled, Holded’s numbering is used. Template, warehouse, taxes and accounting account are set according to your store’s settings, as before.

How are payments recorded?

PrestaShop payment methods are mapped to the banks you have in Holded (not to payment methods), so you can reconcile each payment with its bank account.

  • If the order status is configured as paid, the document is created with the payment already attached.

  • If it’s configured as pending, the document is created pending payment. When the order changes to a paid status, the payment is added to the same document, without creating any new document.

  • The original payment is never rewritten. If the order amount goes down after it has been invoiced, the difference is reflected in the corresponding corrective invoice.

☝🏼 If you edit an order that hasn’t been paid yet in a store that issues invoices or receipts, the correction waits: we don’t issue anything until the order changes to a paid status. The amount isn’t lost; it builds up. As soon as payment is confirmed, we issue a single document with the full difference accumulated up to that point.

What happens when you edit an order that’s already been invoiced?

We issue a corrective invoice with the difference. The original invoice stays untouched.

If you add a product. Example: an order invoiced for €50.00 to which you add a €30.00 product.

Document

Amount

Original invoice

€50.00

Corrective invoice

€30.00

Order value

€80.00

If you change a price. Example: a €100.00 invoice where you raise the price to €120.00.

Document

Amount

Original invoice

€100.00

Corrective invoice

€20.00

Order value

€120.00

If you make several edits in a row. Each edit creates its own document with the change from the previous state. Example: an order that goes from €100 to €80, then to €120 and finally to €90.

Document

Amount

Original invoice

€100.00

Corrective invoice 1

−€20.00

Corrective invoice 2

€40.00

Corrective invoice 3

−€30.00

Order value

€90.00

  • A change to the shipping status or delivery address doesn’t create any document.

  • A change to the order status that doesn’t change products or amounts doesn’t create any corrective invoice.

  • If the same order arrives twice with no changes, no second document is issued.

Returns and refunds

Every return results in a negative corrective invoice. The original invoice keeps its full sale amount; the sum of the invoice and its corrective invoices reflects the order’s actual net amount.

☝🏼 For Holded to reflect a return, process the refund from the order itself in PrestaShop, specifying the products and quantities being returned. Holded receives it as an order update with fewer units.

If part of the order is returned. Example: a customer buys a €29.95 T-shirt and €89.90 trainers, with an invoice for €119.85. They return the T-shirt.

Item

Amount

T-shirt

−€29.95

Corrective invoice total

−€29.95

The final value of the transaction is €89.90. The corrective invoice applies only to the returned product; shipping and discounts aren’t affected.

If the entire order is returned. Example: you refund an order with a €119.00 jacket and a €24.95 cap.

Item

Amount

Jacket

−€119.00

Cap

−€24.95

Corrective invoice total

−€143.95

The order is brought to zero. If you cancel an order that hadn’t been invoiced yet, we don’t issue any document.

If there are several returns on the same order. Example: on a €100.00 order, the customer first returns €30.00 and, weeks later, another €20.00.

Document

Amount

Original invoice

€100.00

Corrective invoice 1

−€30.00

Corrective invoice 2

−€20.00

Order value

€50.00

If the customer exchanges one product for another. We issue a single document with the returned product and the new one, already netted off. Example: the customer returns a €30.00 item and takes another one for €35.00.

Item

Amount

Returned item

−€30.00

New item

€35.00

Document total

€5.00

If you sync orders as sales orders

A sales order isn’t a tax document, so it works differently:

  • It’s updated on the same document with every change to the order. No corrective invoices are created.

  • Refunds don’t create any document: the sales order already reflects the order’s current state.

  • If you have stock sync enabled, the units are marked as fulfilled on the sales order. Products with batches or serial numbers are linked.

  • If you’ve already converted the sales order into an invoice in Holded, the sync doesn’t touch that converted document.

Taxes

The tax rate for each line is set according to your account and store settings:

Situation

Tax applied

PrestaShop reports the line’s tax

The equivalent rate in Holded

PrestaShop reports an equivalence surcharge

The corresponding equivalence surcharge is applied

The line arrives without tax

The store’s default tax

The order is in another currency

It’s converted to your account’s currency and the exchange rate used is saved

The reconciliation adjustment line. When closing each document, we check that the sum of the lines exactly matches the order amount in PrestaShop. If there’s a difference of a few cents due to rounding, we add a visible adjustment line so the document closes at your store’s exact amount. It’s a rounding adjustment, not an actual charge or discount.

When do we not issue any document?

Situation

Reason

The order status isn’t in your status settings

We wait for the order to change to a configured status

You edit an invoiced order that hasn’t been paid

We wait for the order to change to a paid status; the amount builds up and isn’t lost

You refund an order synced as a sales order

The sales order already reflects the current state

The shipping status or delivery address changes

It doesn’t affect the document’s content

The order arrives twice, with no real changes, or with an old notification

There’s no difference to reflect

You cancel an order that hadn’t been invoiced yet

There’s nothing to correct

You don’t need to set anything up

  • The whole process is automatic: there are no documents to create or corrective invoices to issue manually.

  • Every sale, edit or refund recorded in PrestaShop is reflected in your documents.

  • Invoices that have already been issued are never modified. Every correction is a new document linked to the original.

  • The total of all documents for an order always matches what that order is worth in PrestaShop.

A note on scope

This behaviour is enabled per account and applies to all the e-commerce stores integrated with it. You can see how it works in general in the article Ecommerce – How e-commerce document sync with Holded works.

Did this answer your question?