Implementing custom "Remember Me" with Stripe

Posted by Matt on Programmers See other posts from Programmers or by Matt
Published on 2014-08-17T22:56:10Z Indexed on 2014/08/21 4:30 UTC
Read the original article Hit count: 491

Implementing remember me with Stripe, while not using their Checkout (not supported on PhoneGap), seems to be fine using the path:

First time:

  1. Request token on the client side using card info.
  2. Create customer on server side using token.
  3. Upon confirm, charge customer.

Second time:

  1. Check if current user is Stripe customer by requesting the info from our server.
  2. If is Stripe customer, show "use credit card on file" instead of regular CC form.
  3. Upon confirm, charge customer.

However, there is one important convenience items missing--last four digits of card number. Most sites inform you of the card you're using before making the payment, pretty important in case you have to switch out cards.

I have seen that you can retrieve charges which would allow me to get the last four digits. Is it bad practice to pull that and display it?

Are there alternative solutions anyone has in mind?

© Programmers or respective owner

Related posts about payment

Related posts about credit-cards