International postal codes supported

The Rainforest Payment Component now supports inputting international postal codes when the user inputs an international card number.

Canadian card number with Canadian postal code

Canadian card number with Canadian postal code

International postal code syntax varies per country ranging from numerical to alphanumeric. Some examples include:

  • US postal codes are exactly 5 digits, for example 10001.
  • United Kingdom postal codes are alphanumeric and can be 5 to 7 characters long, for example SW1A 1AA or L1 8JQ.
  • Canada postal codes are alphanumeric and exactly 6 characters, for example M5H 2N2.
  • India postal codes are exactly 6 digits, for example 110001.

What's changed

Previously, the Payment Component required a 5 digit postal code, regardless if the card number was US or international. This requirement increased friction for international customers and it was not intuitive that they could get around this requirement by inputting 00000 for the postal code.

Now, the Payment Component will dynamically adjust the postal code requirements depending on the type of card number the user enters. The new logic is:

  • If the card is US, then the 5 digit postal code will still be required.
  • If the card is international (non-US), then the user can enter alphanumeric values to input the correct postal code.

We've also updated the UI to use the term "Postal code" instead of "ZIP code" to be more inclusive of international postal codes.

Please contact support if you have any questions.