Shamim
Shamim

Reputation: 703

Get added card detail using braintree_web Javascript sdk

I am using Braintree JavaScript SDK v3. I have already done the card added process. Now I want to get that card detail (Payment Methods)using client side Braintree javascript v3 liabrary. Is there any way to get cards detail?

Upvotes: 0

Views: 113

Answers (1)

drs6222
drs6222

Reputation: 616

If you've already added the card/payment method to your Braintree Vault, you can look up the token that represents that payment method using;

result = braintree.PaymentMethod.find("token")

From there, you can parse it's Result Object to find any pertinent info you'd want, for example, the last 4 digits of the card.

Upvotes: 1

Related Questions