#SatriaRizali
1 messages · Page 1 of 1 (latest)
$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',
]);
Sure, you'd use price_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
or do i need create first every single transaction ?
did the code was right ?
Nope, you're using the wrong parameters. Check the API reference
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
I guess you'd assign a variable to your API call:
$session = $stripe->checkout->sessions->create([])
thank you yes i can. best dev ever