Base solution for your next web application
Open Closed

Stripe integration questions (switch from single payment to subscription and downgrade edition) #9822


User avatar
0
ipservant created
  • What is your product version? -> 8.1.0
  • What is your product type (Angular or MVC)? -> Angular
  • What is product framework type (.net framework or .net core)? -> .net core

Hello,

From the documentation (https://docs.aspnetzero.com/en/aspnet-core-angular/v8.1.0/Features-Angular-Subscription-Stripe-Integration) and after our generally successful integration tests, we still have the following questions:

  1. How can a tenant switch from single payments to subscription later?
  2. How can a tenant downgrade the edition to a paid one that has a lower price?
  3. How should we add VAT (we are seated in Germany and need to add 16 % VAT on all amounts and show this into the invoices)

Additionally to those points: 3) We would like to make tenants pay per user and month (which is probably not possible out of the box as far as I see), it would be great if you could give us some hints how you would realize this or if this is on the roadmap?

Thank you very much :-) ips-ad


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ips-ad

    1. On the subscriotion page, there will be a button which allows tenants to switch between subscirption to one time payment. This button will be visible only if tenant has a paid edition.
    2. This is not implemented by default in AspNet Zero. Host user must downgrade the tenant in the Tenants page.
    3. Depending on your choice of payment gateway, you can take a look at its documentation. then, you can modify PayPalGatewayManager.cs or StripeGatewayManager.cs. For example, 2Checkout (which is not integrated into AspNet Zero now) handles this automatically.

    For your final question, it seems like you need to calculate the price on the fly. You can modify this part https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/MultiTenancy/Payments/PaymentAppService.cs#L255 and include your own loginc into price calculation.

    I hope these helps you.

  • User Avatar
    0
    ipservant created

    Hi,

    Thanks for explaining, I think we will make some custom adjustments in the files you mentioned. I also think we will need to update to Stripe's current API as it supports VAT calculation now (and generally Stripe isn't very "good" at downwards compatibility...).

    Just for point 1) it looks to me that if a customer once chose to go for a single payment, he will not be able to switch to subscription later (the button is not shown). Is that correct or did we maybe break something during a Zero update migration..? If it is correct, then we might disable single payments generally and go for subscriptions only (giving the customer the possibility to quit monthly).

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ips-ad

    Just for point 1) it looks to me that if a customer once chose to go for a single payment, he will not be able to switch to subscription later (the button is not shown). Is that correct or did we maybe break something during a Zero update migration..? If it is correct, then we might disable single payments generally and go for subscriptions only (giving the customer the possibility to quit monthly).

    Yes, you are definitely right. If a tenant starts with one time payment, then tenant can't switch to a subscription.

    You can always send true to server here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/account/payment/buy.component.ts#L71 or better, set the related value to true on server side. You also need to modify the related html file to hide one time payment option. You also need to disable PayPal since AspNet Zero's default PayPal integration doesn't support recurring payments yet.

  • User Avatar
    0
    ipservant created

    Thanks, we have adjusted it in that way and it is working fine. For the future we might add Stripe's customer Billing portal, too (where customers can set up new cards or cancel the subscription).