Reputation: 43
I want to allow the customer to update their payment details used for a subscription, for example their card may expire or they may wish to use a new card.
If they have an active subscription I don't want to take a new payment from them yet obviously, so in this case is it sufficient to use Payment Method: Create to add the new payment method passing it the 3DS enriched nonce?
I know the amount which they will be charged so I can pass this amount to the 3DS challenge.
Will this payment method then be safe in terms of 3DS for any future charges for this subscription assuming the amount being charged goes no higher than the amount passed to the 3DS challenge?
Do I need to use Subscription: Update in any way or does setting the new payment method as default (using the makeDefault parameter when creating the payment method) guarantee that it will be used for the next payment on the subscription?
Upvotes: 1
Views: 218
Reputation: 43
Answering my own question after figuring this out.
Using Subscription.Update is necessary, and you should pass it the 3DS enriched nonce.
It is not necessary to use Payment Method: Create, typically the recommend flow for updating a subscription would be:
For what it's worth I managed to still use the Dropin UI, for steps 1-2 then I used verifyCard in my code to initialise the 3DS challenge.
Upvotes: 2