0

Context: We allow users to subscribe to our content by using Paymill subscriptions (monthly or yearly). The user can cancel the subscription at any time, which will remove any future transactions under their client account, but not the current transaction (ex current month or year). We do this by using subscription.setCancelAtPeriodEnd(true); when the users cancels their subscription. Also, as you can see, we are using the Java paymill-java library.

Question: The only missing bit is to actually cancel their content in our app when the current period ends. So, is there a webhook for EventType.SUBSCRIPTION_CANCELLED which will be called at the actual period end ? I see there is a EventType.SUBSCRIPTION_DELETED webhook, but I presume this won't work as we don't actually delete the subscription. I know there are probably other solutions to this matter, like managing the cancelled period end in our app, but this would be much more cumbersome than just using a webhook. At least IMHO.

dmulter
  • 2,608
  • 3
  • 15
  • 24
Bogdan Zurac
  • 6,348
  • 11
  • 48
  • 96

1 Answers1

1

there are some new webhooks with the subscription v2.1 coming out last week. For example * subscription.expiring: returns a subscription-object * subscription.deactivated: returns a subscription-object * subscription.activated: returns a subscription-object * subscription.canceled: returns a subscription-object

Have a look at https://www.paymill.com/de-de/dokumentation/referenz/api-referenz/#events

Think yours is the subscription canceled one but you need to make the subscription creation with the api v2.1.

cbraun75
  • 116
  • 2
  • Ok fair enough, but those events are not present in the v3.2.0 release of paymill-java library, marked from April 2014. So should another release for this lib come soon which will contain those new event types ? – Bogdan Zurac Jul 07 '14 at 12:53
  • 1
    @Andrew we are working on a release of paymill-java for API v2.1. You can watch this issue: https://github.com/paymill/paymill-java/issues/48 – stoilkov Jul 08 '14 at 06:54
  • @stoilkov Cool, thanks for pitching in ! Do you have an ETA for the release ? Days, weeks, months ? Because if it would take longer (ex, months), I would need to find a workaround until its release, either through the current paymill-java API or through our own implementations. – Bogdan Zurac Jul 08 '14 at 07:47
  • @Andrew release is planned for the end of next week. – stoilkov Jul 09 '14 at 11:15
  • @stoilkov /* … not yet implemented for subscription v2.1 for this wrapper. Please use the old version of subscription v2.0 and have a look in the V2.0 PDF … */ How can we create a subscription now ? – Bogdan Zurac Jul 23 '14 at 12:48
  • @Andrew version 4.0 is out now. you can download it from maven central. – stoilkov Jul 24 '14 at 14:06
  • Well that is what I have tried yesterday, but i have yet to find a method to create a subscription, as older method is not available anymore. – Bogdan Zurac Jul 24 '14 at 14:11
  • 1
    @Andrew we will update the API reference with code snippets for paymill-java 4 next week. But you can use the javadoc in maven central or online at http://paymill.github.io/paymill-java/, as well as the test suite. A good start is the SubscriptionTest file https://github.com/paymill/paymill-java/blob/master/src/test/java/com/paymill/services/SubscriptionServiceTest.java – stoilkov Jul 25 '14 at 11:25