#SatriaRizali

1 messages · Page 1 of 1 (latest)

lethal timberBOT
gentle egret
#

$stripe->checkout->sessions->create([
'success_url' => 'https://example.com/success',
'cancel_url' => 'https://example.com/cancel',
'line_items' => [
[
'price' => [
'unit_amount' => 25000,
'currency' => 'jpy',
'product' => [
'name' => 'custom',
],
],
'quantity' => 1,
],
],
'mode' => 'payment',
]);

vale rain
gentle egret
#

or do i need create first every single transaction ?

gentle egret
vale rain
#

Nope, you're using the wrong parameters. Check the API reference

gentle egret
#

i think there no error in my code now thank you. but how do i get the response ?

#

i try to print $stripe , i think it's not checkout session that came out

vale rain
#

I guess you'd assign a variable to your API call:

$session = $stripe->checkout->sessions->create([])
gentle egret
#

thank you yes i can. best dev ever