Store card data for token created in mobile SDKs (iOS and Android)


This article gives information on how you can store the card expiry date details in the Peach Payments mobile SDK payment flow.

When integrating the mobile SDK and tokenization process you will need access to the following card data in order to store in your database along with the token:

Last 4 digits of Card

Card Expiry

Card Brand

A user typically enters this information into the checkout screen in the app which does NOT send the data to your server.

To store these details, you will need to cast transaction.paymentParams to PWCreditCardParams and then receive ccNumber (masked), ccExpiryYear & ccExpiryMonth and ccType

See the link below for more technical documentation

Storing the expiry date may be useful if you would like to remind your customers when their card is about to expire, or to prevent failed transactions due to an expired credit card.

Merchants who have a subscription payment model may especially find this important since customer's credit cards may expire while their subscription is still valid, causing the subsequent payment to fail.

Have more questions? Submit a request


Powered by Zendesk