I was able to figure out how to store cc’s on Stripe and then tokenize them for use with Shopify Checkout API. You won’t be able to use Payment Intents, but you can still save payment methods and have your clients re-use them. The steps done with the Stripe API can also be done with the SDK.
-
Tokenize the card with the Stripe’s secret key, not the front end call that’s documented in Shopify. I get these from the Stripe Elements component and pass it to my back end for the tokenization call.
-
Attach the card to a Customer
POST to https://api.stripe.com/v1/customers/{customerId}/sources with body
source={token from step 1} -
Customer should have a new source attached to it
-
On your checkout process when creating the token if the cc you want to use is not the default, you’ll need to call the token endpoint with the Stripe secret key again and send the body
customer={customerId}&card={cardId} or just the customer parameter which will return a token for the default_source.Remember to send the Stripe connected account id that comes from the checkout’s shopify_payments_account_id field.
Hope this helps!