Skip to main content

Getting Started with Deposits and Fees

This guide walks you through creating and managing Deposit and Fee Rules on the Hii Retail platform. By the end of this guide, you will understand how to configure refundable deposits (like bottle deposits) and non-refundable fees (like eco taxes) for your Items.

Overview

What is a Deposit and Fee Rule?

A Deposit and Fee Rule defines how a refundable deposit or fee is applied to specific Items. It specifies the amount to be added to a receipt when an Item is sold at the POS.

Common use cases include:

  • Bottle deposits - Refunded when containers are returned
  • Eco taxes - Fees on tires, electronics, or packaging
  • Packaging fees - Charges for bags or containers
┌─────────────────────────────────────────────────────────────────────┐
│ Deposit and Fee Rules │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Item: "Coca-Cola 500ml" │
│ Price: €1.49 │
│ ──────────────────────── │
│ + Deposit Rule: "bottle-deposit-pet-500ml" │
│ + Amount: €0.25 (refundable) │
│ ──────────────────────── │
│ Total at POS: €1.74 │
│ │
│ When bottle returned → €0.25 refunded │
│ │
└─────────────────────────────────────────────────────────────────────┘

Rule Types

TypeDescriptionExample
REFUNDABLE_DEPOSITAmount refunded when item/container is returnedBottle deposits, electronics recycling
FEENon-refundable charge added to the saleEco tax on tires, plastic bag fee

Rule Statuses

StatusDescription
ACTIVERule is active and applied to items
DELETEDRule is deleted and should not be used

Deposit and Fee Rules are global (not per Business Unit). Each rule is referenced by its depositAndFeeRuleId on the Item entity:

┌────────────────────┐         ┌─────────────────────────┐
│ Item │ │ Deposit/Fee Rule │
│ │ │ │
│ id: "cola-500ml" │────────▶│ id: "pet-bottle-025" │
│ depositAndFeeRuleId│ │ amount: 0.25 │
│ "pet-bottle-025" │ │ type: REFUNDABLE_DEPOSIT│
└────────────────────┘ └─────────────────────────┘

Prerequisites

Before you begin, ensure you have:

  1. Business Unit Group created: At least one Business Unit Group (see Business Units guide)
  2. Authentication Token: A valid JWT bearer token with the pnp.dep-and-fee-rule.create permission
Authentication

For details on obtaining an access token, see the OAuth2 Authentication documentation.

API Base URL

All Deposit and Fee Rule Input API requests should be sent to:

https://deposit-and-fee-rule-input.retailsvc.com/api/v1

Step 1: Create a Refundable Deposit Rule

Create a bottle deposit rule that will be refunded when the container is returned.

Required Fields

FieldTypeDescription
idstringUnique identifier (max 250 characters)
amountnumberDeposit amount to add at POS
statusstringACTIVE or DELETED
businessUnitGroupIdstringThe Business Unit Group where this rule applies

Code Examples

curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "pet-bottle-025",
"name": "PET Bottle Deposit 0.25",
"description": "Refundable deposit for PET bottles up to 500ml",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 0.25,
"taxableGroupId": "Standard",
"isPercentage": false,
"isIncludedInPrice": false,
"businessUnitGroupId": "acme-retail-group"
}'

Response

A successful request returns 202 Accepted.

Asynchronous Processing

The Deposit and Fee Rule Input API processes requests asynchronously. A 202 Accepted response means your request has been queued for processing.

Step 2: Create Multiple Deposit Rules

Different container sizes often have different deposit amounts. Create rules for various sizes:

# Small bottles (up to 500ml) - €0.25 deposit
curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "pet-bottle-small-025",
"name": "Small PET Bottle Deposit",
"description": "Deposit for PET bottles up to 500ml",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 0.25,
"taxableGroupId": "Standard",
"businessUnitGroupId": "acme-retail-group"
}'

# Large bottles (1L+) - €0.50 deposit
curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "pet-bottle-large-050",
"name": "Large PET Bottle Deposit",
"description": "Deposit for PET bottles 1 liter and above",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 0.50,
"taxableGroupId": "Standard",
"businessUnitGroupId": "acme-retail-group"
}'

# Cans - €0.15 deposit
curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "can-deposit-015",
"name": "Can Deposit",
"description": "Deposit for aluminum cans",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 0.15,
"taxableGroupId": "Standard",
"businessUnitGroupId": "acme-retail-group"
}'

Step 3: Create an Eco Tax Fee

Create a non-refundable fee for environmental taxes (e.g., tire disposal tax).

curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "eco-tax-tire",
"name": "Tire Disposal Eco Tax",
"description": "Environmental fee for tire disposal",
"type": "FEE",
"status": "ACTIVE",
"amount": 2.50,
"code": "ECO-TIRE",
"taxableGroupId": "Standard",
"isPercentage": false,
"isIncludedInPrice": false,
"businessUnitGroupId": "acme-retail-group"
}'
Fee vs Deposit

Use FEE for non-refundable charges like eco taxes, bag fees, or service charges. Use REFUNDABLE_DEPOSIT for amounts that are returned to the customer when items are returned.

Step 4: Create a Country-Specific Deposit Rule

Some countries have specific deposit regulations. Use the countryCode field to specify regional rules.

curl -X POST 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "no-pant-3kr",
"name": "Norwegian Pant 3 NOK",
"description": "Norwegian bottle deposit (pant) for large bottles",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 3.00,
"countryCode": "NO",
"taxableGroupId": "Standard",
"businessUnitGroupId": "acme-retail-group"
}'

After creating deposit rules, link them to Items by setting the depositAndFeeRuleId when creating or updating the Item.

curl -X POST 'https://item-input.retailsvc.com/api/v2/bu-g-items' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "cola-500ml",
"name": "Cola 500ml PET Bottle",
"status": "ACTIVE",
"type": "STOCK",
"itemCategoryId": "beverages-soft-drinks",
"salesUnitOfMeasurement": "EA",
"assortmentType": "IN_ASSORTMENT",
"businessUnitGroupId": "acme-retail-group",
"depositAndFeeRuleId": "pet-bottle-small-025"
}'
POS Display

When the item is scanned at POS, the deposit amount (€0.25) will be added as a separate line on the receipt.

Step 6: Update a Deposit Rule

Use PUT to update an existing deposit rule (e.g., when deposit amounts change).

curl -X PUT 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "pet-bottle-small-025",
"name": "Small PET Bottle Deposit",
"description": "Deposit for PET bottles up to 500ml - Updated",
"type": "REFUNDABLE_DEPOSIT",
"status": "ACTIVE",
"amount": 0.30,
"taxableGroupId": "Standard",
"businessUnitGroupId": "acme-retail-group"
}'

Step 7: Delete a Deposit Rule

Delete a deposit rule when it's no longer needed.

curl -X DELETE 'https://deposit-and-fee-rule-input.retailsvc.com/api/v1/deposit-and-fee-rules/pet-bottle-small-025?businessUnitGroupId=acme-retail-group' \
-H 'Authorization: Bearer <your-access-token>'
Items Still Linked

Before deleting a deposit rule, ensure no Items are still referencing it via depositAndFeeRuleId. Update those Items first to remove the reference or assign a different rule.

Common Deposit Configurations

CountryContainer TypeTypical Deposit
SwedenPET bottles < 1L1 SEK
SwedenPET bottles ≥ 1L2 SEK
SwedenAluminum cans1 SEK
NorwaySmall bottles2 NOK
NorwayLarge bottles3 NOK
GermanySingle-use bottles0.25 EUR
GermanyReusable bottles0.08-0.15 EUR

Next Steps

Now that you can configure deposits and fees, you can:

  1. Create Items with deposits: Link deposit rules when creating beverage items
  2. Set up reverse vending: Configure deposit return workflows
  3. Track deposits: Monitor deposit collections and redemptions in reports

Next: Sales Restrictions - Learn how to configure age restrictions and sales controls for regulated products.