#RzSlim

1 messages ยท Page 1 of 1 (latest)

manic pecanBOT
lament creek
#

Hello! Do you have a question about that?

coarse pumice
#

yeah one sec, let me add images

#

I've got 4 identical prices that represent sizes

#

but i have no clue which price was purchased 0.o

lament creek
#

I can see that's test mode, but I'm not sure if that's real info or not (like the address and stuff). This is a public server, so you may want to delete those images if so?

coarse pumice
#

no test mode

#

it's all fake info

lament creek
#

Was this through Stripe Checkout?

coarse pumice
#

yeah

#

i generate a session on the front

#

end*

lament creek
#

You can look at the Checkout Session's line items to see which specific Price was used.

coarse pumice
#

but how do i access that from the dashboard ?

lament creek
coarse pumice
#

That's fine, the problem is this is for a client,

#

she uses the dashboard to see her sales

#

when people checkout prices are added to the line items, but i get not information concerning the "particular" price that is added as a line item

#

it's only general infomration concerning the parent product

#

The only information that belongs to the price "itself" is the Unit amount, but can i not get any other information unique to the price ?

#

the nickname, or the price id even ?

lament creek
#

You can if you scroll down to the Events and logs section and find the original Checkout Session creation at the bottom. That will show the Price IDs used.

coarse pumice
#

ok let me look for that quickly, thanks for your help by the way

lament creek
#

No problem. Products in Stripe are designed to represent a thing people buy, and Prices are designed to represent what they pay for that thing. If you have different things (like two sizes of a thing) that should be two separate Products, not two Prices under a single Product.

coarse pumice
#

yeah i realise that now, i was under the impression that prices could be used for product variants

#

but i realise now that's not a good usage of prices

#

Ok, i see it in the events logs in the Checkout session completed event

#

can i add data to this custom fields attribute when the checkout session is created to make it more accessable once the purchase is completed LOL

lament creek
#

No, Checkout Sessions can't be modified after they're created like that, and those custom_fields are used to present actual fields on the Checkout page anyway.

coarse pumice
#

oh ????

#

well that's my answer ??

lament creek
coarse pumice
#

do those custom fields show up on the invoice ????

lament creek
#

You could set a key like size to large for example, and that will show up in the Dashboard.

coarse pumice
#

and can i set them as read-only ?

lament creek
#

Metadata can be edited in the Dashboard, if that's what you mean?

#

Metadata is only visible to you, not the customer.

coarse pumice
#

yeah the meta data doesnt provide any value because i need to add the Price nickname as "Data" when i create the checkout session

#

because i just need to client to see WHICH prices were actually purchased

#

because those represent sizes

#

can i try custom field and you leave this thread open ?

lament creek
#

To clarify, you just want your client to be able to easily see what size was purchased in the Stripe Dashboard?

coarse pumice
#

Yeah exactly !

lament creek
#

Right, so use metadata.

coarse pumice
#

yeah ?

lament creek
#

Yes.

#

Set it on the Payment Intent when you receive the checkout.session.completed Event.

coarse pumice
#

it'l show up somewhere in th epayment details ?

lament creek
#

Yes.

coarse pumice
#

I'm not using webhooks i'm just create the session on the server and sending the Session id back to the client

#

then i use stripe front end to redirect to checkout

lament creek
#

If you're not using webhooks how are you handling fulfillment?

#

This is how it would show up in the Dashboard:

coarse pumice
#

ok aweeeesome

#

fulfillement is done manually

lament creek
#

That's with a key set to size and a value set to large.

coarse pumice
#

these clients are on a budget

#

Word, let me try that out real quick ur goated

lament creek
coarse pumice
#

ok was gonna say bc setting it on the checkout session doesnt work,

lament creek
#

Correct.

coarse pumice
#

yeah im dumb lol

#

payment inntent is what i have to set it on mb

lament creek
#

Nah, I wish the Checkout Session metadata propigated to the Payment Intent.

#

I think it would make more intuitive sense if it did that. ๐Ÿ˜…

coarse pumice
#

ah well there you go

#

good feedback for the devs

#

and you assuming you are one

lament creek
#

Yeah, I lost that argument. ๐Ÿ˜…

#

Feedback already given!

coarse pumice
#

lol

#

alright so payment_intent_data and then metadata im assuming

#

siiick

#

you're a lifesaver

#

let me try that real quick

lament creek
#

Yep.

coarse pumice
#

Solid, i'll abuse this little as a reflection of the cart basically

#

Thank you so much , 5 Star review for you brother

lament creek
#

Happy to help!

coarse pumice
#

Cheers!