I'm using the Stripe M2 reader in my iOS app to take credit card payments from customers. This works fine for single products, but I’d like to be offer customers the ability to sign up for a monthly subscription and to take payment for the first charge using the reader. Stripe billing would then do the recurring charges on its own. I would like the user to just do the card tap but not have to enter any card details on top of that.
The PaymentIntent that the reader confirms always have the payment method type ‘card present’ (whichever way i set it up using the Stripe SDK in my node back-end) and apparently that cannot be used to make future payments (the PaymentMethod cannot be attached to the user if it has that type).
Technically, I'm certain this is permitted since there are apps (for example the 'Payment’ app) that do it. The initial PaymentIntent created using that app has an invoice associated with it, has payment_method='card' and the recurring charges happen just fine. I feel like I'm missing a critical step or setting.
My payment flow is very straightforward: Discover/connect reader -> create payment intent -> collect payment -> confirm PI -> attach payment method to customer (this is where it fails with "PaymentMethods of type 'card_present' cannot be saved to customers" -> create subscription.
Any insights greatly appreciated.
Unfortunately you cannot use a Terminal reader to process the first Payment Intent from a Subscription.
That is because you need to configure the payment method type on the Subscription and it will apply to all Invoices & Payment Intents that the Subscription generates.
However there is a work-around. You can use a Setup Intent to save the payment method for the Customer and then use that saved Payment Method when creating the Subscription. You can review this approach here
Specifically, how this works is you use a Setup Intent to collect the Payment Method details from the Customer's card when they swipe/chip/tap the M2 Reader. When this succeeds, it will return the Setup Intent along with the generated_card
property.
This generated_card
is the ID of the Payment Method with type: "card"
that you can use as the default_payment_method
when you create a Subscription.