Latest posts Visit blog
In plain words: what is this page about?

After a sale, many customers send back only part of an order. Then it is not clear how much money they get back. The law sets the deadline and the way to pay. It does not say how to split the discount. We show two ways to do the math with one example. Shop, stock system and payment service should then show the same amount.

Black Week and Cyber Monday bring full carts and, a few weeks later, the returns. For Black Friday and Cyber Monday 2025, the German Retail Federation expected revenue of 5.8 billion euros (HDE). Many of these orders carry a cart discount, a threshold discount such as “€20 off orders from €100”, a bundle or a free item. With a partial return after a promotion, a simple question then comes up: how much is refunded? This article shows the legal cornerstones in Germany, two calculation methods using an example, and how shop, ERP and payment provider show the same amount.

Why partial returns after promotions take calculation

On average, online shoppers in Germany send back 11% of their online purchases (Bitkom); 1,050 online shoppers aged 16 and over were surveyed in October 2023. For the 2026 Christmas season, the German Retail Federation expects online revenue of 23.1 billion euros, a nominal 4.1% more than in 2025 (HDE). The withdrawal period is 14 days (BGB) and, for a purchase of goods, usually starts when the goods are received (BGB). Returns from promotion weeks therefore typically arrive in a batch in December.

The calculation problem arises because the discount and the return work at different levels. A cart discount applies to the order as a whole, while the return concerns individual line items. Which part of the discount belongs to the returned item is stated neither on the invoice nor in the law. The merchant has to define it so that customer, customer service and accounting can all recalculate the same figure.

For customers, speed and clarity matter: 94% of online shoppers say a fast refund of the purchase price is important to them (Bitkom), and almost half (49%) have kept a product at least once because the return process was too complicated (Bitkom); 978 people who shop online were surveyed in early 2025. How to reduce returns overall is covered in our article on returns management in e-commerce; this article is about the amount that flows back.

One amount, three systems

The refund amount appears in the customer account of the shop, on the correction document in the ERP and in the partial refund at the payment provider. If the three differ by one cent, accounting will be looking for it at the end of the month. The calculation rule therefore belongs in exactly one place; the other systems take over the result.

In Germany, the unwinding after a withdrawal is governed by Sections 355 and 357 of the Civil Code (BGB). Section 357(1) BGB sets the maximum period: the performance received must be returned within 14 days at the latest (BGB). For the merchant, this period starts when the declaration of withdrawal is received (BGB), not when the goods arrive in the warehouse. If you accept withdrawals through a withdrawal button in the shop, you already have the time of receipt as a data record.

The merchant must also refund any payments the consumer made for delivery; additional costs need not be refunded where the customer chose a type of delivery other than the least expensive standard delivery offered (BGB). For the refund, the merchant must use the same means of payment the consumer used, unless something else was expressly agreed and the consumer incurs no costs as a result (BGB). For a card payment, this means a partial refund to the card.

Two rules give the merchant some room. In a consumer sale of goods, the merchant may withhold the refund until the goods have been received back or the consumer has proven that they were sent (BGB). The consumer bears the direct cost of returning the goods if the merchant informed them about this in advance (BGB). The right of retention only shifts the timing, however, not the amount.

Section 357 BGB implements Directive 2011/83/EU on consumer rights. Its Article 13 requires all payments, including the costs of delivery where applicable, to be reimbursed not later than 14 days after the trader has been informed of the withdrawal (Directive 2011/83/EU). On vouchers, the recitals state:

The reimbursement should not be made by voucher unless the consumer has used vouchers for the initial transaction or has expressly accepted them.

Directive 2011/83/EU on consumer rights, recital 46
RequirementLegal basisConsequence for a partial return
Maximum periodSection 357(1), Section 355(3) BGBwithin 14 days at the latest from receipt of the withdrawal
Delivery costsSection 357(2) BGBup to the least expensive standard delivery; partial returns not expressly regulated
Means of paymentSection 357(3) BGBpartial refund via the same payment method
RetentionSection 357(4) BGBpayout as soon as goods or proof of dispatch are available
Return shipping costsSection 357(5) BGBborne by the customer if informed in advance
No further claimsSection 361(1) BGBbeyond the withdrawal rules, no claims against the customer as a result of the withdrawal

Section 361 BGB sets a limit for every discount rule: beyond the provisions on withdrawal, there are no further claims against the consumer as a result of the withdrawal, and these provisions may not be deviated from to the consumer’s detriment (BGB). A discount rule must therefore not turn the withdrawal into a penalty.

What the law leaves open

As precisely as Section 357 BGB regulates the deadline and the means of payment, it says little about discounts. There is no statutory rule for allocating a threshold discount in a partial return. Which allocation applies results from how the promotion is designed and from the general terms and conditions, and it must be described there in a way the customer can understand before buying. The European Commission guidance on the Consumer Rights Directive notes that the directive does not expressly provide for a partial withdrawal; where an order includes promotional items, the trader should not be obliged to agree to the return of only the items sold at full price (European Commission). By its own account, the guidance is not legally binding (European Commission), but it shows that promotional goods deserve separate consideration in a partial withdrawal.

A provision in general terms and conditions is invalid if, contrary to the requirement of good faith, it unreasonably disadvantages the other party; this can also result from the provision not being clear and comprehensible (BGB). A discount rule that only becomes visible at the time of the refund is therefore a risk. It belongs on the promotion page, in the cart and in the terms and conditions, with the same wording.

The outbound shipping costs are another open question. Section 357(2) BGB requires delivery costs to be refunded, but does not say what applies if the customer sends back only part of the order. The directive speaks of payments covering the expenses of delivering the goods (Directive 2011/83/EU), again without a partial case. Several readings are arguable: the flat shipping fee stays with the merchant because the goods kept had to be shipped anyway; it is refunded pro rata; or it is refunded in full. Views on this differ, and there is no certainty here.

Choose and agree on the rule deliberately

This article describes calculation methods and their technical implementation, not legal advice. Define the rule for discount shares and shipping costs with your legal counsel and the VAT consequences with your tax advisor. After that, what matters is that the rule is described identically in the withdrawal notice, the promotion terms and the refund email, and that the system calculates exactly that.

A worked example with a threshold discount

The example from the graphic: in Black Week, a customer orders a winter jacket for €120.00, boots for €60.00 and a beanie for €20.00. The promotion reads “€20 off orders from €100”, and shipping costs a flat €4.90. She pays €184.90 by credit card. After delivery, she withdraws from the purchase of the winter jacket and sends it back. In the example, the flat shipping fee stays with the merchant, one of the readings described above.

ItemPriceShare of goods valueDiscount sharePrice after discount
Winter jacket (returned)€120.00120 of 200€12.00€108.00
Boots€60.0060 of 200€6.00€54.00
Beanie€20.0020 of 200€2.00€18.00
Total goods€200.00200 of 200€20.00€180.00
Shipping€4.90no shareno share€4.90
Paid–––€184.90

Method A – pro rata per item: The discount is allocated in proportion to the value of the goods. The jacket accounts for 120 of 200 euros of goods value and therefore €12.00 of the discount; the refund is €108.00. The check: goods worth €72.00 after discount are kept, plus €4.90 shipping, a total of €76.90. €108.00 and €76.90 add up to the €184.90 paid.

Method B – recheck the threshold: After the return, the value of the goods kept is €80.00 and therefore below the threshold of €100.00. If the discount is tied to this threshold, the remaining order is recalculated without the discount: €80.00 of goods plus €4.90 of shipping come to €84.90. The refund is €184.90 minus €84.90, i.e. €100.00, which is €8.00 less than with method A.

Both methods add up. They differ in who bears the discount share of the goods kept: with method A, the customer keeps the pro rata discount on the boots and the beanie; with method B, she loses it. Method B therefore reduces the refund as a consequence of the withdrawal, and this is exactly where Section 361 BGB comes in. Whether that is still a permissible consequence of the promotion terms is not expressly regulated by law. Method A avoids this question because each item only carries the discount that applied to it at the time of purchase.

The check for every refund

The refund plus the value of the order kept must equal the amount paid. This one equation belongs in the refund logic as an automatic check: if it does not add up, nothing is paid out until someone has checked it.

Three rules for allocating the discount

Three basic patterns come into question for allocating cart discounts. The law prescribes none of them; what matters is that the rule is described before the purchase and calculated the same way in all systems.

Pro rata by goods value

The discount is allocated at purchase in proportion to the line item values and stored per line item. The discounted line item price is refunded, regardless of the order of several returns.

Recheck the threshold

The remaining order is checked against the promotion condition and recalculated without the discount if it falls below the threshold. Arithmetically consistent, but not expressly covered because of Section 361 BGB.

Discount stays with the rest

The discount is assigned to the goods kept first. As long as they reach the threshold, the full price of the returned item is refunded. Customer-friendly, but costly when a lot comes back.

Shopware itself calculates an absolute cart discount pro rata: the discount is split in proportion to the line item value relative to the total of the affected line items, the split is stored in the payload of the discount line item under the key composition (Shopware source code) and is saved with the order. The ERP can therefore take over the discount share per line item instead of calculating it itself. How promotions are set up in Shopware is covered in our article on the Rule Builder and promotions in Shopware.

Method A can be described in one sentence, for example: “If individual items are returned, a cart discount is allocated in proportion to the item prices; the discounted price of the returned items is refunded.” Method B or a hybrid needs a more precise description of the threshold and a worked example on the promotion page. Agree on the wording with your legal counsel.

Bundles, free items and vouchers

Other promotion formats raise their own questions in a partial return. The principle remains: the allocation is fixed at the time of purchase, not invented at the time of the return.

  • Percentage discount on individual items: If the discount is already on the line item, for example 20% off all jackets, the discounted line item price is refunded.
  • Bundle or “3 for 2”: The bundle price is allocated to the items in proportion to their individual prices and stored at purchase; if one item is returned, its share is refunded.
  • Free item above an order value: A free gift carries no discount share. If the remaining order falls below the order value, the same question arises as with the threshold discount. It is usually simpler to let the customer keep the gift.
  • Discount code and gift voucher: Instruments that merely entitle the holder to a price reduction are not vouchers within the meaning of the German VAT Act (UStG). A discount code is therefore allocated like a cart discount. A gift voucher, by contrast, is a means of payment; its share can go back as credit if the customer used a voucher for the initial transaction (Directive 2011/83/EU).
  • Several means of payment: If the customer paid partly by voucher and partly by card, you need a traceable assignment of the refund to the means of payment, for example in proportion to the payment shares, agreed and explained in the refund email.
  • Marketplace orders: Here the refund is usually handled by the marketplace; the ERP takes over its amount. More on this on our page on marketplace integrations.

VAT and the correction document

The return changes the taxable amount. If the taxable amount of a taxable supply has changed, the business must adjust the tax owed on it (UStG); this applies accordingly if a supply has been reversed (UStG). The adjustment is made for the period in which the change occurred (UStG), so usually in the period of the refund. Clarify the details with your tax advisor.

Mixed VAT rates are more demanding. The standard rate is 19% of the taxable amount (UStG), and for certain goods it is reduced to seven percent (UStG). If the order contains a book and a jacket, the cart discount is spread across two tax rates. The invoice must show the consideration broken down by tax rate, as well as any reduction agreed in advance that is not already included in the consideration (UStG). If the discount is allocated per line item at purchase, the breakdown by tax rate follows automatically.

The supporting document is a cancellation invoice, an invoice correction or a commercial credit note referring to the original invoice. For tax purposes, however, the German term “Gutschrift” means an invoice issued by the recipient of the supply by prior agreement (UStG). The document types in the e-invoice format are described in our article on ZUGFeRD cancellation invoices and credit notes; for business customers, the rules on e-invoices under ZUGFeRD and XRechnung apply as well.

In Shopware, the credit note document requires an invoice that has already been generated and separate credit line items in the order (Shopware source code). Someone enters their amounts, manually or via an integration, and that is exactly where it is decided whether the discount share is deducted correctly.

One amount in shop, ERP and payment provider

A partial refund runs across at least three systems: the shop accepts the withdrawal and the return, the ERP books the goods receipt and the correction document, and the payment provider pays out. For all of them to show the same figure, one place must lead the calculation, often the ERP. A typical process:

  1. Record the withdrawal: Store the time of receipt; this determines the period of 14 days for the refund.
  2. Assign the line items: Link the return to the order, the line items and the quantity.
  3. Book goods receipt or proof of dispatch: This ends the right of retention.
  4. Calculate the amount: according to the stored rule, with discount share, shipping rule and check.
  5. Create the correction document: referring to the original invoice, with tax per rate.
  6. Trigger the partial refund: against the original transaction, or as a bank transfer for prepayment.
  7. Inform shop and customer: status, amount and calculation in the customer account and by email.

There are different ways to connect the ERP depending on the system, for example to JTL-Wawi, to Microsoft Dynamics or to accounting via DATEV. What matters is the question of who calculates. If shop and ERP both calculate, rounding differences will occur sooner or later.

A proven approach is to calculate in whole cents and to distribute leftover cents by largest remainder. That way, the sum of the shares equals the discount exactly, and each share is reproducible:

allocate-discount.php
<?php
declare(strict_types=1);

/**
 * Allocates a cart discount in cents to the line items,
 * in proportion to their value. Leftover cents go to the
 * items with the largest remainder so that the sum is exact.
 *
 * @param array<string,int> $positionCents line item value in cents per item
 * @return array<string,int> discount share in cents per item
 */
function allocateDiscount(array $positionCents, int $discountCents): array
{
    $total = array_sum($positionCents);
    if ($total <= 0 || $discountCents <= 0) {
        return array_fill_keys(array_keys($positionCents), 0);
    }

    $shares = [];
    $remainders = [];
    foreach ($positionCents as $id => $cents) {
        $shares[$id] = intdiv($discountCents * $cents, $total);
        $remainders[$id] = ($discountCents * $cents) % $total;
    }

    $left = $discountCents - array_sum($shares);
    arsort($remainders);
    foreach (array_keys($remainders) as $id) {
        if ($left <= 0) {
            break;
        }
        $shares[$id]++;
        $left--;
    }

    return $shares;
}

// Example from the article: 2000 cents discount on jacket, boots, beanie
$shares = allocateDiscount(['jacket' => 12000, 'boots' => 6000, 'cap' => 2000], 2000);
// Result: ['jacket' => 1200, 'boots' => 600, 'cap' => 200]

The function belongs in the place that fixes the shares at the time of purchase. If they are stored with the order, nothing needs to be allocated at the time of the refund. We develop such extensions as part of our custom programming.

Keep the deadline in view

An overview of open refunds with the date of receipt, the goods receipt and the days remaining prevents refunds from being left lying around in December. If the goods or the proof arrive only after the 14-day period has expired, the refund should be made without undue delay (European Commission).

Explain the refund, do not just transfer it

Whether the customer asks questions depends on whether they can follow the amount. A refund email showing the calculation includes:

  • the returned items with their original price
  • the discount share per item with a short explanation, for example “pro rata cart discount”
  • how shipping costs are handled under the shop rule
  • refund amount, means of payment and payout date
  • for voucher payments, the part that comes back as credit

The same information belongs in the customer account and in the customer service note. How the condition check in the goods receipt can be added is shown in our article on AI-based returns inspection; the opposite direction, promotion stock tied up in unpaid prepayment orders, is covered in the article on automatically releasing promotion stock.

Checklist for promotions and returns

This article is published in the middle of Black Week. The terms of the running promotion are fixed, but you can still check whether shop and ERP calculate them the same way before the returns arrive.

  • Read the promotion terms: do they describe what happens to the discount when individual items are returned?
  • Create a test order with a threshold discount, return one line item and compare the refund in all three systems
  • Set up the check: refund plus order kept equals the amount paid
  • Define the rule for shipping costs in partial returns and describe it identically everywhere
  • Store the date the withdrawal was received and set up a deadline overview
  • Run through voucher payments and mixed means of payment
  • Check whether the correction document shows the tax per rate correctly
  • Prepare a refund email that shows the calculation

How we support you with refund logic

We implement refund logic where it belongs: as an extension in the shop, as a component of the integration with your ERP or in a middleware. The basis is the Shopware Community Edition or your existing shop system, implemented with custom programming rather than paid add-on modules.

Store discount shares at purchase

Allocation of cart discount, bundle and voucher per line item, calculated in cents and reproducible.

Refunds according to your rule

Pro rata, with a threshold check or as a hybrid, just as your promotion terms describe it, each with an automatic check.

Correction document and VAT

Credit note or invoice correction referring to the original invoice, with tax per rate, as an electronic invoice if required.

Partial refund and deadline

Triggering at the payment provider, a deadline overview from receipt of the withdrawal and feedback to the shop and customer account.

Whether your shop runs on Shopware or on another system: we start with an inventory of your promotion types and payment flows and work through a few real orders. After that, it is clear which rule applies, where the calculation happens and what needs to be done in programming for shop and integration.

Sources and studies

This article is based on the German Civil Code (Sections 307, 355, 356, 357 and 361 BGB), the German VAT Act (Sections 3, 12, 14 and 17 UStG), Directive 2011/83/EU on consumer rights (Article 13, recital 46), the European Commission guidance on this directive (Official Journal C 525 of 29 December 2021), press releases of the German Retail Federation (HDE) of 17 November 2025 and 3 November 2026, press releases of Bitkom (surveys in October 2023 and early 2025) and the Shopware 6 source code. All information retrieved on 4 November 2026. The worked example is freely chosen.

The law does not expressly regulate the partial case. Section 357(2) BGB requires delivery costs to be refunded up to the least expensive standard delivery (BGB), but does not say what applies if the customer keeps part of the order. Views on this differ; define your rule with your legal counsel and describe it identically everywhere.

There is no statutory rule for threshold discounts. A recalculation is arithmetically possible but is in tension with Section 361 BGB, under which, beyond the withdrawal rules, there are no further claims against the consumer as a result of the withdrawal (BGB). If you take this route, you need a clear promotion condition that is visible in advance and a legal review.

The performance received must be returned within 14 days at the latest (BGB). For the merchant, the period starts when the declaration of withdrawal is received (BGB). In a purchase of goods, the merchant may withhold the refund until the goods are back or the customer has proven that they were sent (BGB).

The refund must use the same means of payment the customer used, unless something else has been expressly agreed and the customer incurs no costs (BGB). A voucher usually only comes into question if the customer originally paid with a voucher or has expressly accepted one (Directive 2011/83/EU).

In one place, often in the ERP, because the correction document is created there; for smaller shops, an extension in the shop is often enough. The other systems take over the result. We support the connection through our integrations for shop and ERP.

The statutory right of withdrawal belongs to consumers. Returns from business customers are usually based on a contract or goodwill. The calculation logic for discount shares and tax is the same; it pays to build it the same way for both customer groups.