#SatriaRizali
1 messages · Page 1 of 1 (latest)
Here is discount for Checkout: https://stripe.com/docs/payments/checkout/discounts and here is tax for Checkout https://stripe.com/docs/payments/checkout/taxes
Good luck!
$payment = $stripe->checkout->sessions->create([
'success_url' => 'https://example.com/success',
'cancel_url' => 'https://example.com/cancel',
'line_items' => [
[
'price_data' => [
'unit_amount' => 25000,
'currency' => 'jpy',
'tax_behavior' => 'exclusive',
'product_data' => [
'name' => 'Prefecture custom',
],
],
'quantity' => 1,
],
],
'automatic_tax' => [
'enabled' => true,
],
'mode' => 'payment',
'discounts' => [[
'coupon' => [
'percent_off' => 10,
'duration' => 'once'],
]],
]);
i try make direct discount , it seems not working
do i have make coupun every transaction ? can i just make direct when i create stripecheckout ? just like item , i make them directly when i create stripecheckout
Um not possible AFAIK. You would need to pre-create the Coupon first then use its Id
so that coupon not like price system ?
It's a different object