Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept Blue: Allow subscription cancellation #440

Open
martijnvdbrug opened this issue Jun 6, 2024 · 3 comments
Open

Accept Blue: Allow subscription cancellation #440

martijnvdbrug opened this issue Jun 6, 2024 · 3 comments
Labels
feature New feature

Comments

@martijnvdbrug
Copy link
Member

martijnvdbrug commented Jun 6, 2024

Is your feature request related to a problem? Please describe.
We would like to be able to cancel created Accept Blue subscriptions, but there is no endpoint for that.

Describe the solution you'd like
An order line could have multiple subscriptions created in Accept Blue, but from a client perspective this shouldn't matter, so we would like to refund subscriptions referenced by order line ID:

    deactivateAcceptBlueSubscription(
      orderId: ID!
      orderLineId: ID!
    ): AcceptBlueSubscription!
  • The accept blue service will get the created subscription IDS from the orderline, and cancel all subscriptions for that order line in Accept Blue.
  • The order should not be cancelled, because it's the subscription that is being cancelled, not the order. Cancelling an order would mean the actual purchase never happened

We are still awaiting AC support to know how to cancel a subscription. De-active, or delete, or ?

@martijnvdbrug martijnvdbrug added the feature New feature label Jun 6, 2024
@is0utfitters
Copy link
Collaborator

By cancel we mean to end the repeating payments for that particular schedule. Wouldn't that be as simple as setting active=false for the schedule? We will also need to put a subscription "on hold" meaning we will suspend payments during a period - I would think the same method would apply but we would eventually change the active=true again for the "on hold" schedule. My question would be if we actually delete the schedule, do we lose the payment history etc that we need?

@martijnvdbrug
Copy link
Member Author

@is0utfitters Indeed, that's why deleting is not the prefered optioin. I wasn't sure if we could just pass active=false, because the sandbox env was using a different API call not available to us. But it turns out we can just deactivate:

image

I've also changed the mutation name to deactiveAcceptBlueSubscription to better reflect the action that its doing. This can indeed also be used to pause a subscription

@tianyingchun
Copy link

I have question, how to handle Recurring paid?

  1. if customer create a subscription paid monthly with intitial price $100
  2. the second month, stripe will auto make payment for user with $100
  3. should we make a webhook hook to handle Recurring paid events?

it seems that stripe subscription can not support this? e.g. we may need to run job to update somethings in vendure backend, (update licence period to next month)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants