#Bando

1 messages ยท Page 1 of 1 (latest)

faint mantleBOT
grave hatch
radiant sorrel
#

It will just be used for that individual session?

#

Says **Data used to generate a new Price object inline. ** so i assume it means the price will be permanently generated instead of used once.

dusky mountain
#

๐Ÿ‘‹ stepping in as codename_duchess needs to step away

radiant sorrel
#

np

dusky mountain
#

It does create a new Price, but that Price will be archived

radiant sorrel
dusky mountain
#

Up to you really

#

But yeah if you already know ahead of the Checkout Session a set amount for your Products then having a set Price makes more sense imo

#

Either way works just fine however

radiant sorrel
# dusky mountain Either way works just fine however

awesome ty, just to confirm it would look like this? I'm using PHP

$stripesession = $stripe->checkout->sessions->create(['success_url' => $successurl,'cancel_url' => $cancelurl,'line_items' => [['price_data' => ['currency'=> 'usd','product'=>'prod_N7AwEq49xMdmFX','unit_amount'=>'25000'],'quantity' => 1,],],'mode' => 'payment','metadata' => ['purpose'=> 'purchase', 'type'=> $setuppurpose],'expires_at' => time() + 3600]);```
dusky mountain
#

Really hard to read that unformatted. Looks good as far as I can tell. Would always recommend just testing it as the best way to check!

radiant sorrel
#

Ah ok no worries I appreciate ur help