#andonovn - Checkout Session metadata

1 messages ยท Page 1 of 1 (latest)

opaque marlin
#

Yes you can, you can set the metadata via the subscription_data.metadata parameter when creating the Checkout Session

#

That will set the metadata on the resulting subscription. And that will get copied somewhere on the invoice, let me confirm exactly where...

#

That metadata will appear in the Invoice's line items

fallow oasis
#

Thanks! Seems like I've overseen that. And what about non-subscription payments?
The "invoice.paid" event is sent regardless of the "mode" (ie payment vs subscription), isn't it?

strong narwhal
#

Hi ๐Ÿ‘‹ I'm stepping in for @opaque marlin
If your checkout session is for payment mode it will not generate an invoice. However, the payment_intent.succeeded event will fire both when Invoices for Subscriptions are paid and when Checkout Sessions for one-off payments are completed.

fallow oasis
#

Thank you very much to both of you for all the clarifications! ๐Ÿ™‚

strong narwhal
#

Happy to help ๐Ÿ™‚