2

Can I find the states codes somewhere that have to be used for the PayPal address format?

For example: Which states codes have to be used for Turkey?

I already tried IST for Istanbul for example, but that doesn't work.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
user3589413
  • 21
  • 1
  • 2

2 Answers2

3

From the Classic API Developer Guide:

PayPal accepts the following State codes in the State field of an address.

  • Canada
  • Italy
  • Netherlands
  • United States

...

For Turkey you should not need to pass a state code as this field is optional. And the state codes on this page are the only valid codes.

Aaron
  • 1,271
  • 1
  • 7
  • 10
  • Unfortunately, PayPal requires the state field for other countries like China or Japan as well. – Simon Nov 03 '15 at 08:02
1

I had the same problem. When the country is Mexico, PayPal complains if the state field is missing. I tried "AGU" and "MX-AGU", for Aguascalientes, then PayPal claimed the field was too long. Finally it accepted "AG", which I found here: http://en.wikipedia.org/wiki/Template:Mexico_State-Abbreviation_Codes

Looks like that developer guide page that PP_MSI_Aaron shared, might need updating.

For Turkey you could try http://en.wikipedia.org/wiki/Provinces_of_Turkey#Codes maybe?

However when I tried it with country=Turkey and no state/province, PayPal did not complain. But then I am using PayPal via SagePay via Magento, which only submits the state/province data for a select few countries (Turkey not among them), so I can't test what PayPal would say if I tried it with country=Turkey and province=IST.

Doug McLean
  • 1,289
  • 12
  • 26