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

Create Subscription After Successful Payment #2002

Open
shaun-forgie opened this issue Apr 12, 2024 · 2 comments
Open

Create Subscription After Successful Payment #2002

shaun-forgie opened this issue Apr 12, 2024 · 2 comments

Comments

@shaun-forgie
Copy link

How are we able to ensure that payment is successfully processed before creating a subscription? A number of discussions have occurred about this. See https://groups.google.com/g/killbilling-users/c/kEmVrRA7_08/m/oTBfvKdgAQAJ

@sbrossie sbrossie added the triage To be triaged label Apr 12, 2024
@sbrossie
Copy link
Member

The best way to achieve this with current system is to use the entitlement api to intercept the subscription call.

  1. Make a 'standalone' payment - if fail abort the call. If success:
  2. Generate a credit on the account for the amount
  3. Have the subscription call complete and consume the credit

The payment will not be linked to the subscription though (so I realize this is not optimal), but as a workaround we can use custom tags to create a link between the two (e.g. analytics reports, ...).

@shaun-forgie
Copy link
Author

shaun-forgie commented Apr 12, 2024

If a flag or switche was passed to the create subscription API this flow could be managed by the backend. We could create a new subscription state called verifying_payment or extend the PENDING state to PENDING_PAYMENT to reflect this.

@sbrossie sbrossie removed the triage To be triaged label May 6, 2024
@sbrossie sbrossie added this to the Release-0.26.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants