Page 1 of 1

Subscriptions and recurring payments

Posted: 17 Oct 2016, 18:45
by valentin.manthei
Hello,

thanks for your great software.

I would like to use aimeos for subscriptions, e.g. if you purchase the product "One package of toilet paper every month".

What is the best approach to add these features to aimeos? Should the user do a normal checkout and then I'll add new orders programatically every month?

For payments there could be two approaches:
- Save payment data locally and bill the user with a new order using the payment interface.
- Create a subscription (e.g. using stripe) and add orders when the payment gateway sends success calls.

Thank you for any input.

Also, is there any documentation for the integrated DirectDebit payment service?

Best regards,
Valentin

Re: Subscriptions and recurring payments

Posted: 19 Oct 2016, 15:03
by aimeos
valentin.manthei wrote: I would like to use aimeos for subscriptions, e.g. if you purchase the product "One package of toilet paper every month". What is the best approach to add these features to aimeos? Should the user do a normal checkout and then I'll add new orders programatically every month?
Doing subscriptions for single products of an order wouldn't be feasible I think (payment issues and others) but reoccurring orders are possible. Aimeos already has some infrastructure for this because the order details (mshop_order_base* tables) are separate from the order ID and status (mshop_order and mshop_order_status).

The user must do a normal checkout but must chose e.g. in the delivery step that the order should be recurring and the time frame. This could be done by a service decorator (https://aimeos.org/docs/Developers/Library/Service) like these ones: https://github.com/aimeos/aimeos-core/t ... /Decorator

Afterwards, a job controller would have to create a new entry in the mshop_order table and call the payment service provider to do the payment again (https://aimeos.org/docs/Developers/Cont ... controller)
valentin.manthei wrote: For payments there could be two approaches:
- Save payment data locally and bill the user with a new order using the payment interface.
- Create a subscription (e.g. using stripe) and add orders when the payment gateway sends success calls.
I would strongly vote for a payment gateway that supports recurring payments by sending back an identifier for further payments. Storing e.g. credit card data locally is only allowed if your system is PCI-DSS compliant and that's an expensive certification.
valentin.manthei wrote: Also, is there any documentation for the integrated DirectDebit payment service?
The direct debit implementation is very simple:
https://github.com/aimeos/aimeos-core/b ... tDebit.php