Issue with Applepay pop up addresses Portugal & Romania

We are facing issues with the Apple Pay pop up addresses. So for Portugal and Romania, we would like to collect the user's Province/State as part of the checkout experience. We already do that with other payment methods, however, we noticed Apple Pay pop up doesn't include state/province fields for these two countries, which causes orders to arrive with that field as blank. This is causing a lot of logistics issues during fulfillment. Is there a way to fix this and have the field appear for Portugal and Romania users?

Case reference: 102869141084

Thank you!

Answered by DTS Engineer in 893701022

Hi @MsrgITG,

You wrote:

[...] Is there a way to fix this and have the field appear for Portugal and Romania users?

Please submit a report via Feedback Assistant so the Apple Pay team can review this suggestion directly.

As a workaround, both Portugal and Romania have stable, deterministic mappings from postal code to administrative region. Apple Pay does return the postal code in the onshippingcontactselected callback (even in the redacted pre-authorization contact), so you can resolve the region server-side without asking the user anything extra.

session.onshippingcontactselected = async (event) => {
  const contact = event.shippingContact;
  // contact.postalCode and contact.countryCode ARE present
  // contact.administrativeArea will be "" for PT and RO

  if (["PT", "RO"].includes(contact.countryCode)) {
    const resolvedRegion = await lookupRegionByPostalCode(
      contact.postalCode,
      contact.countryCode
    );
    // Store resolvedRegion server-side against the session
  }

  session.completeShippingContactSelection({
    status: ApplePaySession.STATUS_SUCCESS,
    newShippingMethods: [...],
    newTotal: {...},
    newLineItems: [...]
  });
};

**Important:**Be sure to defensively normalize the administrativeArea field on ingest—both "" and null have been observed for PT and RO across different OS versions:

const adminArea = contact.administrativeArea ?? "";
// Treat both null and "" as absent; do not depend on which one Apple returns

Further considerations

  • Portugal: The CTT (Portuguese postal authority) publishes postal code data mapping to 18 districts and 308 municipalities. Third-party geo-data services also cover this.
  • Romania: The 6-digit postal code maps reliably to one of the 41 counties plus Bucharest—a static lookup table of ~1K rows is sufficient and easy to maintain.

This solution works transparently, requires not additional UI, and is symmetrical across both Apple Pay JS and native PassKit implementations.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hi @MsrgITG,

You wrote:

[...] Is there a way to fix this and have the field appear for Portugal and Romania users?

Please submit a report via Feedback Assistant so the Apple Pay team can review this suggestion directly.

As a workaround, both Portugal and Romania have stable, deterministic mappings from postal code to administrative region. Apple Pay does return the postal code in the onshippingcontactselected callback (even in the redacted pre-authorization contact), so you can resolve the region server-side without asking the user anything extra.

session.onshippingcontactselected = async (event) => {
  const contact = event.shippingContact;
  // contact.postalCode and contact.countryCode ARE present
  // contact.administrativeArea will be "" for PT and RO

  if (["PT", "RO"].includes(contact.countryCode)) {
    const resolvedRegion = await lookupRegionByPostalCode(
      contact.postalCode,
      contact.countryCode
    );
    // Store resolvedRegion server-side against the session
  }

  session.completeShippingContactSelection({
    status: ApplePaySession.STATUS_SUCCESS,
    newShippingMethods: [...],
    newTotal: {...},
    newLineItems: [...]
  });
};

**Important:**Be sure to defensively normalize the administrativeArea field on ingest—both "" and null have been observed for PT and RO across different OS versions:

const adminArea = contact.administrativeArea ?? "";
// Treat both null and "" as absent; do not depend on which one Apple returns

Further considerations

  • Portugal: The CTT (Portuguese postal authority) publishes postal code data mapping to 18 districts and 308 municipalities. Third-party geo-data services also cover this.
  • Romania: The 6-digit postal code maps reliably to one of the 41 counties plus Bucharest—a static lookup table of ~1K rows is sufficient and easy to maintain.

This solution works transparently, requires not additional UI, and is symmetrical across both Apple Pay JS and native PassKit implementations.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Issue with Applepay pop up addresses Portugal & Romania
 
 
Q