deanpcmad / lemonsqueezy

Ruby library for the Lemon Squeezy API
27 stars 7 forks source link

I can't send metadata when creating a payment session #10

Closed EnriqueRapelaDeveloper closed 1 month ago

EnriqueRapelaDeveloper commented 1 month ago

I need to know how I can send metadata when creating a checkout session, so that when the service is returned to me, the response in the webhook can locate the payment attempt with a UID. I'll show you how I have the call and what I need:

session = LemonSqueezy::Checkout.create store_id: 123, variant_id: 123, metadata: { uid: '1234' }

deanpcmad commented 1 month ago

Lemon Squeezy doesn't have a metadata field, but does have a custom field.

Their docs show this here: https://docs.lemonsqueezy.com/api/checkouts#create-a-checkout - scroll down to Attributes then checkout_data