#xfechx
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- xfechx, 2 minutes ago, 52 messages
- xfechx, 1 hour ago, 112 messages
- xfechx-sub-schedule, 10 hours ago, 21 messages
- xfechx, 17 hours ago, 30 messages
- xfechx, 1 day ago, 11 messages
Hello again!
There's no way to copy the metadata over.
Also, can you share example events for both scenarios you mentioned so that I am on the same page?
evt_1OjjeK2lgzywWyExkZPz6C2T
I need to be able to access charge's metadata if I am to listen to invoice.payment_succeded only, because I save which account to use there. The app works with multiple api accounts, and it is stored in metadata->API
there's no way to copy the associated metadata over to the invoice object though.
You'd need to retrieve the invoice again and expand the charge object
I think we're going in circles about this since yesterday. You need to take a step back and re-evaluate.
is there a way to check with an invoice object, if it was created from a checkout session?
talking about the type one_time invoice
OR can I fill metadata for invoice, when making the checkout session?
Not from the invoice object itself but I think you can list checkout sessions by the invoice's payment intent it may return the session https://docs.stripe.com/api/checkout/sessions/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
when invoice_creation is enabled
Setting metadata is definitely possible https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-invoice_creation-invoice_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, checkout has the metadata setup, but i am talking about the invoice that gets creted from checkout session that gets paid
ok, this is what I need
associative array
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.```
invoice_creation.invoice_data.metadata
I need help writing it,
[
'invoice_creation' => ['enabled' => true],
'billing_address_collection' => $zip_code_flag,```
where would I add it there?
so
'invoice_creation' => [
'enabled' => true,
'invoice_data => [
'metadata' => ...
]
]```
something like that?
Yep that looks right
OK that helped a LOT