Adyen / adyen-ios

Adyen iOS Drop-in and Components
https://docs.adyen.com/checkout/ios
MIT License
150 stars 120 forks source link

Recurring payments using Drop-in components #88

Closed caddac closed 5 years ago

caddac commented 5 years ago

Are recurring payments supported using the drop-in components?

Seems like I could use Drop-in to authorize the first payment, then use https://docs.adyen.com/classic-integration/recurring-payments/capture-a-recurring-payment/ to capture that payment detail?

joostvandijk commented 5 years ago

Hi @caddac,

The components are purely used to collect the payment method details. Then, in your request to /payments, set the storePaymentMethod flag to true. If you then provide the shopper reference in your request to /paymentMethods, you'll also retrieve the list of stored payment methods for that shopper. You can use these stored payment methods by setting paymentMethod.storedPaymentMethodId in your request to /payments.

This flow is relatively new, as we recently unified the recurring and oneclick payments flow. I hope this brief overview helps. The documentation will follow soon.

Best,

Joost

caddac commented 5 years ago

Ok, to recap and clarify my understanding, for a new user that has never signed up

  1. get paymentMethods as specified in DropIn docs

  2. capture user payment details

  3. submit a payment (the first one for this member), specifying the shopperReference and storePaymentMethod=true

  4. after that, on a schedule, submit a payment to /payments, specifying the paymentMethod.storedPaymentMethodId from the initially stored payment method.

Does that sound right?

joostvandijk commented 5 years ago

@caddac This is correct! But, between 3 and 4, you'd have to do /paymentMethods again, with the shopperReference, to retrieve the identifier of the previously stored payment method. This value can be cached.

caddac commented 5 years ago

I'm assuming I can also use these payment details to setup a recurring payment in adyens backend, so we don't have to submit payment request monthly?

joostvandijk commented 5 years ago

Unfortunately, our backend system has no "subscription engine" to automatically perform payments on a recurring basis.

caddac commented 5 years ago

This is pretty disappointing. Your sales site seems to indicate you support recurring and subscription payments (https://www.adyen.com/our-solution/online-payments/recurring-subscription) and this is one feature I need

joostvandijk commented 5 years ago

I understand, but it's unfortunately not an issue with our drop-in/components. Please feel free to open a new issue if you have further questions.