#Braunson - charge_id

1 messages · Page 1 of 1 (latest)

sly pagoda
#

Hi, can you share an example charge id here?

left knot
#

I'm in test mode but an example is ch_3Kw9KgCOn1yQl7Wa0a4npG8O

sly pagoda
left knot
#

Yes but how to do this programmatically, I have the charge_id (from a Checkout Session) via the webhook but have no way to lookup the sessions line items (for a description of the charge on my end).

Ultimately the checkout session does not set the description on the charge (which I want to do but don't see that as being possible). So on my end (on my project) when looking up a charge for the user, there's no description and no identifier of what this charge is for. So I was looking to get the Checkout Session's line item(s) to display those but there is no way programmatically I can see to lookup a checkout session from a charge_id or payment_intent

sly pagoda
#

Let me test something on my test account

sly pagoda
left knot
#

Oh wow, though there may have been an easier way. Thanks pgsk. Sidenote, any way to set the charge description for a checkout session?

sly pagoda
left knot
#

I do set the metadata when creating the Checkout Session however it doesn't pass through to the charge object itself, actually it doesn't seem to be setting at all. I wonder if this is due to the API version we are using.

#

So I am passing metadata when creating the Checkout Session (for example req_XBC4eofTl9KStY) but it's not being passed to the charge.

sly pagoda
#

Ah, you're trying to pass that information to the charge_id not on the checkout session. Sorry.

#

Yeah, that is not supported at the moment.