Applies to: In-App Payments SDK - Android | In-App Payments SDK - iOS | Locations API
Learn how to remove the postal code requirement from the In-App Payments SDK card entry form.
Applies to: In-App Payments SDK - Android | In-App Payments SDK - iOS | Locations API
Learn how to remove the postal code requirement from the In-App Payments SDK card entry form.
If the country code for the targeted location is the United States (US), Canada (CA), or the United Kingdom (GB), you must not remove the postal code requirement. Doing so results in all credit card transactions being declined.
The postal code requirement can be removed for all other countries.
Your mobile application needs to make a request to your server backend to get the correct location and location country. To be valid, the target location must have ACTIVE
status and CREDIT_CARD_PROCESSING
enabled and the location.country
field cannot be US
, CA
, or GB
.
Follow the steps in Locations API to find the correct location.
In the CardEntry.startCardEntryActivity
method, set the collectPostalCode
parameter to false
.
public class CheckoutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.checkout_activity);
//Find the add card button and set a click listener that starts the CardEntry activity
findViewById(R.id.addCardButton).setOnClickListener(v -> {
//Start the In-App Payments CardEntry activity
CardEntry.startCardEntryActivity(CheckoutActivity.this, false);
});
}
}
If you need more assistance, contact Developer and App Marketplace Support or ask for help in the Developer Forums.