return to table of content

Postzegelcode

thih9
21 replies
6d22h

What happens when I share my code with others? I.e. when there are multiple letters with the same code found in an outgoing post box?

molf
5 replies
6d22h

For all mail except the first, the same thing that happens if you send a letter with no postage: the sender will receive a request to pay after delivery. If the sender is unknown the recipient will receive a request to pay (which can be appealed).

miunau
4 replies
6d21h

I mail a fair amount of physical media using the postzegelcode. If you put a return address, PostNL just returns the letter with a sticker on it saying the postage was not enough. They won't deliver it.

lancebeet
3 replies
6d20h

If they deliver the letter to the return address, what prevents you from writing the target address as the return address and getting it delivered for free?

hananova
2 replies
6d20h

They know approximately the area the return address should be at, and they also know who used the app to buy the code.

cedilla
1 replies
6d19h

It's also some kind of fraud in most jurisdictions, or subject to an extra fee if discovered.

Germany's new stamps aren't stamped any more - a QR code gets scanned and logged instead - so people thought they were lucky when they received unstamped letters and decided to re-use the stamp. They got hit with a fine.

Boltgolt
5 replies
6d22h

IIRC the first envelope scanned at a sorting facility invalidates the postzegelcode immediately, any envelopes using it after that will be handled like they had no postzegel at all (receiver has to pay)

OptionOfT
4 replies
6d20h

What if you mail 2 and they are scanned at the same time and the database isn't up to date yet?

zoky
1 replies
6d17h

This seems fairly unlikely to ever occur. The database would have to be decentralized, and the two items would have to be mailed from separate locations and both be scanned more or less simultaneously—or within however many minutes it takes for database changes to propagate, which can’t be all that long since you’re able to buy a code and use it on the same day.

Given how remote the probability of this happening is, simply ignoring it and delivering both pieces probably isn’t unreasonable. Or flag it for further investigation and maybe bill the sender or recipient for an additional piece of mail.

berkes
0 replies
6d11h

And even if for some reason it does occur more often, a message queue is a common, and rather simple solution for this.

dc96
0 replies
6d20h

Seems strange they would design a system that could scan faster than they could process the DB, no? I assume there's some queue in between. But the real answer is probably just: multiple scans happen for the same piece of mail. Eventually, one or both of them will be marked as due for payment. The question then becomes, was it worth saving the postage cost for what is potentially a much costlier penalty?

contravariant
0 replies
6d20h

You may find they will refuse service to you for unspecified reasons.

6510
3 replies
6d22h

In my experience it will be delivered and the sender will be politely asked to pay for it. They don't have to pay for it but it's rude not to.

dmurray
1 replies
6d22h

They don't have to pay for it but it's rude not to.

Given that this is the Netherlands, that sounds like "they won't pay for it".

6510
0 replies
6d4h

Many people think they have to pay.

miunau
0 replies
6d21h

Hmm. When was this? I've had the code read wrong a few times and they just have returned the letter. Then I've gotten a refund for the postage through their customer service.

ragebol
2 replies
6d13h

The typical outgoing mail box, where you put your mail in for it to be delivered, doesn't allow peering into it. So a physical measure to avoid that. But if it's out in the open: first come first serve, like the other comments describe

thih9
1 replies
6d11h

1. Buy an apartment next to a well lit outgoing post box.

2. Install a system of mirrors to peek at the letters being inserted into the box

3. Reuse one code for a 50% chance of saving 1 euro and delivering your mail for free.

4. Send each letter 7 times, each with a different duplicate code, for a 99% chance of at least one free delivery.

Not worth the effort and I’m sure this would be tracked and stopped immediately. But it’s cool that in theory this seems possible.

ragebol
0 replies
4d11h

If you are willing to go that length, I'll give you a damn postzegelcode

consp
0 replies
6d22h

Only the first one would be legal and the recipients would have to pay for the postal cost of the next one. If you put the origin (postal code plus home number is enough) on the back you get a payment proposal in your mailbox.

NikkiA
0 replies
6d12h

I would guess that the system generates more digits - lets say 3

when the postal system checks that PZC on the mail, if there is nothing written by the PZC then it's assumed to be fresh, and the 3 extra digits are looked up via a postal-service-only gateway, then placed on the mail by the PZC for future lookups, possibly along with a date.

If the PZC has the extra digits, then it can be looked up and confirmed as redeemed with those extra digits, and possibly the stamped date.

The extra digits could be stamped or handwritten, possibly with the postmark date used as the redemption date manually entered from the mail as it passes through the sorting system the first time, OR stamped from the date it's registered as redemption, either would work.

Such a system would relatively guarantee that fraud would be difficult, since only one person could have a PZC without the check digits go into the system, and sharing would be useless.

pacifika
21 replies
6d22h

I wonder why they wouldn’t take the address at the time of payment so it’s not needed on the actual letter. That seems more convenient. Backwards compatibility?

dfox
5 replies
6d20h

When we started our own parcel service in 2015 we thought that everything that is needed on the actual parcel is the unique ID of the parcel (generated by a system reminiscent of twitter's snowflake and intentionally printed with digits shuffled around as to increase the chance of the prefix being unique). Pretty quickly we found out that various operational concerns need additional data on the label, with routing info (for manual pre-sorting on the depots) and recipients phone number (the courier locates the parcel in the trunk by that) being pretty important.

Also, cool design of the label is one thing, but on both laser and thermal printers the resolution repeatability is much better in the direction perpendicular to the paper travel, so you do not want to do cute design things with vertical barcodes. And you want to have a huge margin below the barcode if it is aligned to the bottom of the label as some printers will occasionally get misaligned and part of the barcode will get on the next label… and the imaging scanners in Zebra terminals will happily read half a milimetre high code-128 barcode instead of the correct one on the bottom of the label.

inopinatus
4 replies
6d18h

This isn’t a minor detail. As with stored-value cards vs credit cards, the location of the master record(s) has far-reaching consequences for dependant business processes. Any field activity depending on on-demand access to a centralised API contains the seeds of its own failure.

dfox
3 replies
6d18h

The availability of centralized API was not the issue. The issue was that the operators were significantly more efficient when performing the process “by eye” than when supported by some kind of computerized system. For example the on-depot sorting process that we settled on was two-phase: first you sort the parcels either manually by routing codes on the labels or through automated sorting line with the current data and then in second phase the operator scans everything that is supposed to go out of the depot and in that process moves around the ~5% of parcels that got sorted incorrectly, which is incredibly more effective than doing that correctly in one pass.

inopinatus
2 replies
6d18h

The availability of centralized API was not the issue. The issue was that the operators were significantly more efficient when performing the process “by eye” than when supported by some kind of computerized system.

If you think these are different considerations, then you are splitting the wrong hairs. The processes landed on to resolve the conflict are not surprising, but also doesn’t sound like they addressed the underlying architectural conceit.

dfox
1 replies
6d18h

At a large enough scale you can do most of these processes by automation, except the actual courier delivery. And well, at least UPS has actual identified locations in their vans, so just going by location+barcode might be somewhat practical for them.

inopinatus
0 replies
6d17h

Beware of the line of operations research thinking that has latterly tanked Boeing’s engineering reputation, something the rest of us designing layered business processes can all learn from. Complexity is always best handled pushed down to the leaves of the tree. The ideal central body performs reporting and audit, not command and control. Although for some, I suppose the Boeing takeaway might be that the bottom line improved and no-one went to prison.

Kiala
5 replies
6d22h

Or, you know, the mail man?

Sharlin
4 replies
6d21h

Clearly mailmen would just be expected to use their phones to decode the addresses on demand, because everything is supposed to require a phone and an internet connection these days.

A bit more realistically, the address could be printed on a sticker by the sorting machine, the way address redirections are handled.

dfox
2 replies
6d20h

For a mail/parcel carrier relabeling anything is (somewhat surprisingly) a significant added cost (and there is not that much of margin), so they will do everything in their power to not do that unless absolutely necessary.

Denvercoder9
1 replies
6d19h

PostNL relabels approximately all parcels addressed to me (I almost always have to change either the delivery date or location to one convenient to me), completely free of charge.

dfox
0 replies
6d18h

Free of charge to you and free of charge to the sender. Which is exactly my point, for PostNL it is a sunk cost and if that will happen for significant amount of their consignments it would be an issue.

crote
0 replies
5d19h

A bit more realistically, the address could be printed on a sticker by the sorting machine, the way address redirections are handled.

Fun fact: PostNL already does this with 100% of the mail processed. The first step in the sorting process is to OCR the address, generate a "KIX" barcode[0], and print that on the letter using special ink if not already present. It's not intended to be user-readable, but anyone with a smartphone can trivially decode the unique destination address from it.

[0]: https://nl.wikipedia.org/wiki/KIX-code

sodality2
3 replies
6d22h

If mail gets lost for longer than 5 days, it won’t be known who it goes to, since these codes are reused.

pacifika
2 replies
6d21h

Then you can write any code down and wait 5 days to send it

t0mas88
0 replies
6d21h

You can, but an invalid code is treated as if there was no postage stamp on it at all. So your letter will be returned or the receiver is asked to pay.

A code that's past the validity date is probably considered an invalid code as well.

afro88
0 replies
6d21h

Probably the sender has to be linked to the current code for it to be accepted

inopinatus
2 replies
6d18h

If the delivery model can’t survive an apocalypse, collapse of civilisation, or interruption to the rule of law/network connectivity, then you have no business running a postal service.

zoky
1 replies
6d17h

But then how would Kevin Costner be able to make a movie out of it???

inopinatus
0 replies
6d17h

One may jest but the subtext of The Postman (particularly the David Brin novel, which I can recommend) is analysing which pre-apocalyptic institutional operating models are predisposed (or otherwise) to being rebooted/reconstituted even after the loss of all staff and centralised records, which is a definition of business continuity and process resilience I certainly intended to be in scope of the remark above.

Which is to say, Kevin Costner did make a movie about it. Just not a good one.

In practice though you can simulate/stimulate most of the failure mode conditions of central control dependencies by parking a delivery truck underground, or addressing something to a farm.

ale42
1 replies
6d21h

Not sure about NL, but in Switzerland you can buy those codes with an SMS. I guess many people want to do it quickly, and they might have already written the address of the recipient. So just getting a code it much faster, you don't have to enter the address somewhere.

Beldin
0 replies
6d18h

I think the main issue is that regular post has addrrss info of the recipient. So the whole logistics chain is geared towards that. If you remove the need for address info for a (small) subset, you'd have to have two logistics chains somewhat intertwined with each other...

skrebbel
14 replies
6d22h

It works real well for people like me who don’t send physical mail often. Just pay online and write the code onto an envelope with a pen.

I love the simplicity.

berkes
10 replies
6d22h

For me too.

I used to have a sheet of stamps lying around. Often only one was used. Then those would "expire" after years, in the sense that (yearly?) tariff-increasments would invalidate the "now too cheap" ones. I then had to buy additional special ones to compensate for the price.

Digital is the way forward and this is a perfect example of simple digital to analog. It works fantastic.

Sharlin
5 replies
6d22h

Generally there are also non-denominated "forever" stamps available whose real value will remain the same despite changing rates.

saghm
4 replies
6d21h

I assume you're talking about the US? I thought that nowadays all US postal stamps are "forever" ones as of several years ago, but maybe it's just the post offices around where I've lived that don't bother selling the "temporary" ones.

signal11
1 replies
6d7h

The most common UK First- and second-class stamps (the ones without a price on them, just a "1st" or "2nd") don't expire.

Of course you don't need a stamp, you can purchase postage online.

OJFord
0 replies
6d6h

The monetary ones (1p/2p/50p et al.) don't expire either, you just need to meet the cost at the time you use them. (Exactly like cash in that sense: loses value with inflation, but you can still use what you have, just for less.)

ohmyiv
0 replies
6d20h

maybe it's just the post offices around where I've lived that don't bother selling the "temporary" ones.

Are we talking about US? If so, it might be your office. The one near me tries to sell me all kinds when I actually go in to do stuff. USPS still sells varying rate stamps ranging 1 cent additional postage to $30 priority mail express stamps.

Sharlin
0 replies
6d21h

I’m talking worldwide (I only have first-hand experience about Finland, but they seem common according to Wikipedia)

consp
3 replies
6d21h

The old stamps with a monetary value you would have to "add" value by adding a stamp if the cost increased (and people were adding 5ct coins as a result). The new ones (1/2 numbered) do not expire and keep their relative value. [1]

1. https://www.postnl.nl/klantenservice/tarieven-postzegels/gel...

sigio
1 replies
6d6h

With the massive price-hike on stamps, buying a 50/100 roll of these many many years ago, this got a great return on investment ;) Though I'll still have enough stamps to last until I die ;)

ProllyInfamous
0 replies
6d3h

I never thought those ten $50 rolls of 100 first class (USA) stamps would ever pay for themselves... but last I checked FCM stamps are now 36% more expensive.

Still have five rolls, which is:

enough stamps to last until I die ;)

BUT the hand-written OP stamps are a great idea!

berkes
0 replies
6d11h

I was indeed talking about these old ones.

theginger
1 replies
6d21h

Ok now I get it. Somehow despite all the detail the Wikipedia article doesn't seem to capture the point of it.

This does lead me to wonder what happens when something gets held up and it's an older code (sir) but it checks out.

timvdalen
0 replies
6d21h

You (if you wrote a return address) or the receiver (if you didn't) get a bill that you can either pay or ignore

illiac786
0 replies
6d12h

Very true. Most of all because stamps required value for a letter change often and I always ended up with lots of old stamps which were not enough for a letter anymore, had to buy lots of stamps with very little value to complete, it was anarchy.

(2012, 2016, 2019 and 2022 saw price increases for German post for example…)

olooney
10 replies
6d19h

This would make a pretty good programming interview question:

"Design a service with two endpoints, one to create a postzegelcode and another to redeem it. A postzegelcode is a nine character, case insensitive alphanumeric code conventionally displayed in all upper case in a 3x3 grid. Postzegelcodes are valid for 5 days after issue and can only be redeemed once. Authentication and payment are out of scope."

kevmo314
9 replies
6d16h

Insta-hire to the candidate that realizes the number of requests is so small that a plain-text file would suffice.

paulmd
5 replies
6d14h

SQLite, sure, but I don’t want a coworker who chooses the hand-crafted full-scan on artisanal csv libraries or w/e

jzwinck
4 replies
6d12h

You don't need a full scan or a giant CSV file. You can do it with a single small file in a single directory. The file contains the state of a pseudo random number generator. On each request, generate a number, save the new PRNG state into a new temp file in a subdirectory, and rename the temp file over top of the original file. If renaming fails, try the whole process a few more times. This allows multiple processes to serve requests concurrently.

Exercise for the reader: avoid re-reading the PRNG state file on retries.

eternityforest
1 replies
5d10h

Why would you do all that when there's databases engines?

I don't quite understand why programmers love minimalism more than reusing widely trusted and very easy solutions that are known to perform well.

paulmd
0 replies
4d10h

hey mods hire this one

paulmd
0 replies
6d7h

that sounds like a badly home-rolled uuid4 with extra steps.

How about instead we just generate a uuid4, insert it into a sqlite file or Postgres database, and then the postzegelcode value is threefry(SECRET,uuid)?

Mo3
0 replies
6d10h

And how would you invalidate the generated codes after 5 days? And is this even scalable to more than one Postzegelcode in circulation?

OrderlyTiamat
2 replies
6d8h

With a million requests per month (~1k a minute average, non uniform distribution ofc), why not just use something like sqlite? I wouldn't want to work with csv files, and development time is the same.

It's a more standard setup, and enables better logging and later changes.

pcthrowaway
0 replies
5d20h

You don't really need anything relational, so I think sqlite is overkill, and since multiple locations presumably need to write to it, you'd either have to use something like Litestream or write a coordination server to manage the updates from the mail intake locations

I think a Redis instance would be better. Assuming each mail intake device has a unique ID, and ID 0 is intended for un-redeemed postzegelcodes, you could have newly created postzegelcodes SETNX a key with value 0 and a TTL of 5 days, then when mail is being scanned, WATCH the key in a multi transaction, and if the value is 0, SET it to the ID of the intake device, while removing the TTL. The mail can then be rejected at intake if the transaction failed. Upon mail delivery then, you clear the key, which frees it for later re-use.

kazinator
0 replies
6d5h

If they expire in 5 days, that's 1/6 of a million.

lucb1e
2 replies
6d20h

It is only purchasable if you install their software, can't just buy such a stamp on the website if I'm reading the page correctly?

I seem to remember Deutsche Post also had a thing you could just write on the letter, or maybe it was DHL's parcel service instead. Those were purchased simply online like any other product/service and, after paying, it told you what to write in the corner. Or maybe I misremember and they only have this system where you can take the pdf to a parcel shop and have them print your label.

Edit: found the "print in store" option, it's not for letters but for parcels https://www.dhl.de/de/privatkunden/pakete-versenden/angebot-... "Don't have a printer? Let your stamp be printed at [places]."

cedilla
1 replies
6d20h

There used to be a premium number you could send an SMS to. It was more expensive than a normal stamp to cover for the expensive billing.

"Handyporto" replaced this and that's probably also why you can't buy it on the website. Deutsche Post probably can't conceive of people who don't own a printer so they heavily advertise "Internetmarke" which requires one.

illiac786
0 replies
6d12h

Actually the one you write yourself (#PORTO) and the one to print (InternetMarke) are both equally prominent in the app.

rdsubhas
0 replies
5d20h

This is convenient. Do you know if sender tracking is available for these purchases? I tried getting one, but there was no sendungsnummer provided...

kseistrup
0 replies
6d10h

Denmark has had this for years. The code is 3 lines, each with 4 alfadigits. The code is valid for 180 days.

intothemild
0 replies
6d20h

Same here in Norway.

ahartmetz
0 replies
6d20h

Cool, I didn't know that. I still have a few self-printed QR code-type stamps. #PORTO is a nice option.

alkonaut
5 replies
6d22h

I wonder if any of the 9 characters are checksum (the example math indicates none is), or if the validation scan allows a search without one of the characters e.g AB1?3XYZ in case of sloppy writing.

If not, then the system relies on people being able to write 9 consecutive legible characters. With postal codes and addresses it’s less fragile because the context helps disambiguate (a last name helps a postman tell if a street address has a 7 or 1)

molf
3 replies
6d22h

In the case of sloppy writing, the letter will be ejected from the sorting machine and reviewed by a human (same process as for illegible addresses).

If a human cannot find a match then the sender will receive a request to pay for the missing postage (presuming the code is invalid). If the sender is unknown the recipient will receive a payment request (which can be appealed).

Speaking from experience you would normally want the letter to arrive at its destination so I take care to write the code very clearly. I imagine this is true for most people.

kr2
2 replies
6d20h

You massively underestimate the care or thought some Americans give to anything including legibly writing an address; very cool look into how USPS handles that situation (link free to read without subscription)

https://www.nytimes.com/2013/05/04/us/where-mail-with-illegi...

hprotagonist
0 replies
6d18h

“where MNIST comes from”

dark-star
0 replies
6d22h

Since there is already a framework for returning letters with invalid/unreadable/damaged addresses, I'd guess the overhead of returning wrongly-written postzegelcodes is negligible.

TacticalCoder
4 replies
6d5h

Assuming 26 letters and 9 digits (the zero is not used to avoid confusion with the letter O)

That is cute. But what about 'G' and '6', 'B' and '8' and the myriad of things that can go SNAFU when handwriting is involved?

Heck, even on the official picture here:

https://www.postnl.nl/versturen/postzegels/postzegels-kopen/...

The handwriting '1' looks like a 'L'.

Does the system allow for one mistake? Does it automatically try to replace '1' with 'L' and see if it matches a valid code?

I wonder the actual failure rate is. If you decided to not use '0' to avoid confusion, you've accepted that there shall be confusion. And confusion doesn't just happen with '0' and 'O'.

P.S: as a sidenote I know for a fact that at least 30 years ago there were post offices in some EU countries already doing OCR on handwriting, but the ones I've seen were doing it on digits-only, that had to be written on envelopes with pre-printed empty rectangles. It was done for the cities' postcode, to sort the mail automatically.

kazinator
2 replies
6d5h

A well-formed, hand-written O is indistinguishable from a well-formed, hand-written zero. Literally, no amount of effort will make it clear which one is intended, short of some agreed-upon convention to use a different glyph like a slashed O for zero.

This is not true of G and 6 or B and 8. If these are well-formed, they are completely distinct.

People who paid for their post code are motivated to write the code clearly, for fear of nondelivery; but no amount of motivation will fix 0 versus O.

The handwriting '1' looks like a 'L'.

It certainly does not. Rather, the lower case l is easily confused for the digit 1. This postzegelcode doesn't use lower case.

I don't see it mentioned that I is avoided because of 1. The likely reason is that Europeans don't write 1 just as a stick. It starts with an angled upstroke. That upstroke makes it possible to confuse the European 1 with an American 7; but the European 7 has a horizontal stroke across its stem which thwarts that problem. (I addition, a cursive 7's upper horizontal stroke is actually wavy, like a tilde.) Confusion of I, 1 and 7 in European handwriting is next to nil.

wodenokoto
1 replies
6d1h

The likely reason is that Europeans don't write 1 just as a stick. It starts with an angled upstroke.

I'm European, and that's how I write it, but if you look at the link, that's not how they write 1's in the promotional material - Those 1's follow pretty much the stroke I would do for an L, only the foot is shorter and slightly more pointed upward.

kazinator
0 replies
5d23h

I see that. Yikes! The hand in the photo (we are to undestand) copied a pair of nicely typeset 1s, featuring with an upstroke and serif foot, into a pair of sloppy hockey sticks that looks like lower case l's due to the pen trails, and could be taken for I.

wkjagt
0 replies
5d7h

Maybe it's not for technical reasons. It would be easy technically to have them be interchangeable. But someone who just purchased a stamp, and got one with a 0 or an 0, might worry about it not being delivered because their 0 might be mistaken for an 0. So maybe it's just nice UX? Just a guess.

fullspectrumdev
2 replies
6d21h

A similar system (that I have not used yet) has been adopted in Ireland, and apparently it works really well?

jcul
0 replies
6d8h

Yeah, I got a flyer about it in the post recently.

Seems like a great idea, I seldom post anything, but when I do it's a pain to have to go buy stamps.

It's a bit stingy though that they are charging so much more for a digital stamp.

banish-m4
2 replies
6d21h

Americans ought to petition USPS to do this. It sounds extremely convenient because it doesn't require a Pitney Bowes printer or printing anything from Endicia.

PS: Are those tiny, cheap, desktop laser engravers powerful enough to "print" on paper without starting a fire?

tichiian
0 replies
6d20h

PS: Are those tiny, cheap, desktop laser engravers powerful enough to "print" on paper without starting a fire?

Yes, you can modulate their power. It usually takes a few experiments if the manual doesn't have a material table.

m463
0 replies
6d11h

It sounds like the opposite of Forever Stamps.

Maybe Ephemeral Stamps? Momentary Stamps? Whatever Stamps?

rtpg
1 replies
6d17h

Is there any context into why this was put into place at the time it was? I would like to understand why this was set up.

jorams
0 replies
6d8h

I found an article[1] from before it was launched. Translated:

The most important reason for the introduction of the Zegelcode is that about 20% of our customers indicates they don't have a stamp on hand when they want to send something.

[1]: https://www.internetkassa.nu/postnl-verwacht-digitaal-franke...

timvdalen
0 replies
6d21h

Works pretty well, definitely less work than having to go to a store to buy a single stamp whenever I need to send a letter

jabrown
0 replies
2d4h

I am from the Netherlands. I think this is an awful and unnecessary innovation. Postage stamps often have pretty pictures on them and I like the act of having to paste one onto the envelope (some of them you have to lick the back of to make them stick). This just seems like another soulless way of making things machine-readable and less human.

atemerev
0 replies
6d21h

Also works in Switzerland.