#manal-subscription-offsession

1 messages · Page 1 of 1 (latest)

trail deltaBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

pastel tapir
#

I'm sorry I don't understand the question at all @harsh basalt

harsh basalt
#

we have a website where we charge pur clients 2 fees + subscription

#

we integrated the new API for 3d secure issues

#

now we can only charge clients for 2 fees but for subscription we have a problem

#

they ask us to have 3d secure for subscription too even that we confirmed for the 2 fees and we have registered off session

pastel tapir
#

Do you have a concrete example? Also why don't you charge the 2 fees and the Subscription all at the same time?

harsh basalt
#

yes for concrete example what do you need ? the pi code ?

pastel tapir
#

yes

harsh basalt
#

we have this as our use case, people in our service pays 3.9 for a certificate , then 20 as learning fees and then 19.9 to have acces to dashboard this is the agreement with our client

pastel tapir
#

sure but why not have them pay the sum of all 3 in one transaction? It's a waste to do 3 separate payments, you pay more fees and have more risks of declines

harsh basalt
#

it is seperate because some clients will not want to have access to dash and we refund them ect .. it is how it is built to be honest it was our team's call i m only here to find a technical solution

pastel tapir
#

Okay do you have an example that failed so I can look?

harsh basalt
#

yes

#

pi_3OLCNWJ7qIsP2ydu0w4adOg2

pastel tapir
harsh basalt
#

we did

#

$paymentIntent = $stripe->paymentIntents->create([
'customer' => $customer->id,
'setup_future_usage' => 'off_session',
'amount' => 390,
'currency' => config('services.stripe.currency'),
'automatic_payment_methods' => [
'enabled' => 'true',
],
]);

pastel tapir
#

you did not though

#

that's a PaymentIntent creation that is unrelated

#

When you create the Subscription (the log I shared above) you have to pass off_session: true and you did not

harsh basalt
#

can you give me a suggestion or direct doc on how we can do this ?

#

i m not sure my developer understands how

pastel tapir
harsh basalt
#

thank you very much

pastel tapir
#

sure thing! Have a great day!

harsh basalt
#

this is our subscription part $stripe->subscriptions->create([
'customer' => auth()->user()?->stripe_id,
'items' => [[
'price' => config('services.stripe.subscription'),
]],
'default_payment_method' => $payment->payment_method->id,
'payment_behavior' => 'allow_incomplete',
]); and try {
$stripe->subscriptions->create([
'customer' => $user->stripe_id,
'items' => [[
'price' => config('services.stripe.subscription'),
]],
'default_payment_method' => $payment->payment_method->id,
'payment_behavior' => 'allow_incomplete',
]);

pastel tapir
#

sure and it doesn't have the parameter I said.

#

Sorry, this Discord server is aimed at developers with their own questions about their code. You don't seem to be the developer as you copy-pasted something but don't seem to connect that with the exact API reference link I gave

#

the next step is to talk to your developer and have them pass the missing parameter

#

manal-subscription-offsession

harsh basalt
#

no this is actually our code

#

so in this code i only need to add 'setup_future_usage' => 'off_session', ?

pastel tapir
#

not at all

#

I showed you the exact parameter and you're assuming something from another bit of your code because it has a similar name

#

please carefully look at the parameter I said and use that

harsh basalt
#

i found this 'off_session'=> 'true'

#

is that the correct one ?

pastel tapir
#

2:52 PM]koopajah: They change their code to pass the parameter I said: https://stripe.com/docs/api/subscriptions/create#create_subscription-off_session