tutanota
tutanota copied to clipboard
Accounting integration for iOS payment
When receiving webhook callbacks from the apple payment system i want that they are tracked in the booking system so that our database state is consistent.
AC
- Booking items are created
- when upgrading to a paid account
- cancelling to free account
- switching to higher/lower plan
- renewing subscription
- Booking items should be created with a set totalInvoicedCount in case of upgrade or renewals
- Booking items include the price in € independent which foreign currency was used
- Monthly / yearly subscription are reflected in the Booking items
- The end date is tracked correctly (renewal, upgrade to higher plan).
- KPIs are tracked to count upgrades/downgrades
- When the payment method iOS is configure there should be additional restrictions
- Account termination is not allowed
- Adding and reactivating users is prevented.
- Granting credit is not allowed
*Tasks
- [x] Create booking items
- [x] Implement restrictions
- [x] Switch subscription when we receive notification from Apple
- [x] Check if InvoiceBatchJob will work if payment method was changed from AppStore before the run
- [x] Add state diagram for account state + notifications + user actions
- [ ] Bug: It is possible to switch plans without changing App Store Subscription