-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Lemon Squeezy support #947
Conversation
Keen! |
We can raise an error for What else do we need to implement? |
Another oddity I've found, is that they don't list card expiry dates in the API, just the brand and last 4 🤔 |
That is very odd. |
So when a subscription is a trial, set the status as |
Have just pushed a couple more commits, including initial work on docs. Feel free to give it a go. I've noticed they don't have an API for creating charges, so I've sent them an email requesting this plus a few other minor details such as card expiry dates. |
As for linking a subscription to a LS Customer, it appears that setting the email address in the URL links it, but I've added support for passthroughs just like Paddle Classic. This is another thing I've asked about, seeing if we can just pass the Customer ID to link it. An example payment link I've been using has been in this format:
You should replace |
Co-authored-by: Kyrylo Silin <silin@kyrylo.org>
…and moving it to the subscription. also added update_url
Have just heard back from Lemon Squeezy.
This means a passthrough isn't required, but it may be best to keep it for if a customer doesn't exist? |
|
LemonSqueezy.js 2.0 is out now. https://github.com/lmsqueezy/lemonsqueezy.js/releases/tag/v2.0.0 |
Ha, I just received an email from them saying that 😅 I believe that's their official API library, not Lemon.js which is used for checkout overlays. |
Yeah 😆 - Lemon.js is the client-slide library - https://docs.lemonsqueezy.com/help/lemonjs/what-is-lemonjs |
And to think they could have called the Node SDK "lemonode.js". Such a shame. Edit: Hah, someone beat me to it: https://www.npmjs.com/package/lemonode |
Wow published 11 years ago 😅 |
I would love to help get this over the line, is there anything still outstanding that's required for a merge? |
Does this mean lemon squeezy support will be coming to Jumpstart? 👀 |
There are still a few tweaks that need to make such as removing the passthrough code, but I'd say it's ready for you to check over @excid3? |
👋 Similar to @nduplessis, I'd like to help here if possible/necessary. |
Any updates or help needed for this? :) |
I believe it's ready for people to test, so feel free to give it a go |
Thanks! |
Hi @deanpcmad! Thanks for a great job! I've tested this branch and bumped into one error:
Could you take a look at it? Ping me if you need help with this PR, I really want to merge it 😀 |
Ah good spot, will change that |
@deanpcmad I'm not quite sure if it's a valid approach but I'm looking for a customer like this k0va1@4cae510 Passthrough might be not a bad option tho |
Yeah, maybe it would be best to keep the passthrough there |
This reverts commit ff422f2.
…s copied from paddle
@k0va1 feel free to test it now. I've reverted the commit that removes the passthrough code & docs |
@excid3 have you had chance to take a look at this yet? 😄 |
A little, but need to build an end-to-end implementation to test it. |
|
||
def self.sync(charge_id, object: nil, try: 0, retries: 1) | ||
# Skip loading the latest subscription invoice details from the API if we already have it | ||
object ||= ::LemonSqueezy::SubscriptionInvoice.retrieve(id: charge_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we don't find any invoice and got 404 error? i suppose this case should be handled
I bumped into an Error 404: No results were found for your request. '[{"status"=>"404", "title"=>"Not Found"}]' (LemonSqueezy::Error)
while accidentally sending test webhook to production server
Well, Stripe just acquired Lemon Squeezy - https://www.lemonsqueezy.com/blog/stripe-acquires-lemon-squeezy |
Saw that, super exciting! |
@@ -8,7 +8,7 @@ def process! | |||
Pay::Webhooks.instrument type: "#{processor}.#{event_type}", event: rehydrated_event | |||
|
|||
# Remove after successfully processing | |||
destroy | |||
# destroy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering why the addition of lemon_squeezy is commenting this line of code which seems to impact all processors.
This PR adds support for Lemon Squeezy, a Merchant of Record payment provider. Their site is here > https://www.lemonsqueezy.com/
It uses a Ruby library I built, lemonsqueezy.
This is a rewrite of #898 from what I've learnt with integrating Paddle Billing. The Lemon Squeezy API is quite similar to Paddle's Billing API. I have noticed a few things though:
on_trial
. Not sure if you want to set it as that or replace the status withtrialing
when saving?This is a WIP.