Access user's vaulted credit cards at check out? iOS Mobile Buy SDK

Highlighted
New Member
3 0 0

Hello I am currently trying to implement the iOS Mobile Buy SDK into my project. I had a few questions regarding the SDK.

 

1. Once I vault a credit card, is there a way to associate this credit card with a user - so at the checkout the user can just select from a list of their credit cards rather than entering their credit card information every time.

1b. If the SDK does not provide a way to access a user's vaulted credit cards, is it safe for myself to handle saving the token we get back from vaulting the credit card and reusing this token for future check outs? Does this token ever expire?

 

2. How do I check out as a user so that checkout order is associated with that user?

 

Thanks for your help in advance. I've tried searching all over before asking these questions but was unable to find the answers.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
493 98 88

Hi @xanderbuck 

 

1. Shopify does not handle the vaulting / saving of the credit card token. On the checkout, you can use Shop Pay, Google Payments, Apple Pay etc. 

 

1b. You can handle this yourself through a service that is PCI compliant, but you will incur more complexity. For example, you can use Spreedly to handle the tokenization and storage. The SDKs are built on the Storefront API so you can use this as a reference: https://shopify.dev/tutorials/create-a-checkout-with-storefront-api#spreedly

 

2. You will create the access token for your customer, and once you have that you will use: https://shopify.dev/docs/storefront-api/reference/mutation/checkoutcustomerassociatev2 - the syntax will vary slightly in each SDK but the mutation and logic is the same. 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes