After successfully creating a card on stripe and retrieving the token, I need to get the last 4 digits of the card to allow the user to select a credit card
I would ideally like to do this through the front end where i send the token to the stripe server and get a corresponding card object but am unable to find any api in the documentation that allows me to do so.
Is there any way i can achieve this through the front end or will I have to preform this operation on my application backend ?
The STPToken
class has a card
property, and in turn the STPCard
class has a last4
method. You should be able to use those to retrieve the last 4 digits of the card directly within your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With