Closed excid3 closed 3 months ago
Looks like we can pass custom
data to the Checkout which gets included in Webhooks (but not API calls?!) which we could in theory use for passing the user ID. May not be that useful if we cannot sync it via API calls.
https://docs.lemonsqueezy.com/guides/developer-guide/taking-payments#passing-custom-data
Ah good point. I forget that Pay is not just for subscriptions.
The Charge code currently looks at the Subscription Invoice API, but the Order API is similar. However, it doesn't have the card brand or last4 🤔
Hah, of course not! ðŸ«
We probably don't need it, it's more of a nice to have.
Potential problem:
Orders & SubscriptionInvoices are separate. If we store the processor_id
as the Order ID or the SubscriptionInvoice ID, we might end up with duplicates. We could prefix the processor ID and remove it when looking up API records for refunds.
We also don't want to record an Order and the first Subscription Invoice which will be a duplicate.
We may only want to use an Order to create a charge when there are not subscriptions for it.
Yeah it's annoying they have 2 separate order types
Lemon Squeezy seems to be missing one-time payments functionality:
Pay.sync(params)
which is a new featurecard
but could have been PayPal(Correct me if I'm wrong @deanpcmad 😜)