#latwelve

1 messages · Page 1 of 1 (latest)

lime tigerBOT
calm rover
#

So metadata isn't copied in all scenarios

#

We only copy metadata from PI -> Charge once when the PI is confirmed

#

If you share the PI ID, I can see what happened here

fathom pendant
#

hello

#

pi_3MYZ37IEG6XkSwCO05WyQNTh

#

there is an example. the metadata actually originates from the checkout seession so i can see it in that example

#

I was hoping I could pull back a list of charges and at the same time pull in any of my custom metadata that existed from 1 call like so:


$charges = $stripe->charges->all(
  [
    'limit' => 5,
    'created' => [
      'gte' => $start_of_month,
      'lte' => $end_of_month
  ],
  // 'expand' => ['data.metadata'],
]);



#

So i'm guessing it looks like the metadata is only sitting on the Session and not coming across to the charge or pi

calm rover
fathom pendant
#

so it does exist on the session

#

but its how i pull it from a charge or the "charges" call without having to make too many other calls

#

oo thinking about it actually just getting the charge "items" names should solve my current problem

#

is it possible to pull back all item names with the charges() request?

calm rover
#

If you set it at that first link I sent, it will only be set on the PaymentIntent

fathom pendant
#

ignore me!

#

if its only set on the session then i guess theres no way to pull it into the charges() call easily

#

so I'll have to look it up each time?

calm rover
#

Yeah

fathom pendant
#

I think I'll have to do that going forwards but just for now I'll need a report for existing entries - is there a way to pull the checkout session ID so I can loop over it from a single charge?

calm rover
fathom pendant
#

thanks

calm rover
#

Will need PaymentIntent id though

fathom pendant
#

thats all good

#

thanks for your help