#mathan

1 messages · Page 1 of 1 (latest)

rose leafBOT
spiral axle
pseudo tangle
#

let me check

#

this errors comes when i using following code **You specified payment mode but passed a recurring price. Either switch to subscription mode or use only one-time prices.
**

spiral axle
#

You need to set mode to subscription as the error message suggests

pseudo tangle
#

exactly what i need to change?

#

this already sets 'mode' => 'payment',

spiral axle
#

'mode' => 'subscription',

pseudo tangle
#

when checkout it creates new customers with a price. in this scenario I need to set -> the existing customer can go to this checkout page and subscribe to the plan.?

spiral axle
#

Then you need to specify a customer when creating a checkout session

pseudo tangle
#

Is any examples for this?

spiral axle
#
$stripe->checkout->sessions->create(
        [
            'cancel_url' => 'http://127.0.0.1:8000/',
            'line_items' => [['price' => 'plan_N7OtH9opxAc149']],
            'mode' => 'payment',
            'success_url' => 'http://127.0.0.1:8000/',
            'customer' => 'YOUR_CUSTOMER_ID',
        ]
    );
pseudo tangle
#

its add the another price, i want to update the subscription by this checkout!

spiral axle
#

Do you mean you want the customer to manage the susbcription?

pseudo tangle
#

okay

#

whats a purpose of this checkout page?

crisp sparrow
#

👋 Taking over this thread, catching up now

#

Checkout page is for the subscription/payment that the customers have selected the price/plan to purchase

pseudo tangle
#

its also foe usage based right

#

if customer purchase the plan by checkout, after the cycle ends(30days) then they need to pay the amount via customer portal right?

crisp sparrow
#

No, an invoice will be sent to customer after the cycle ends, or the payment will be charged to customer's card if the subscription is set to charge_automatically. Customer portal is simply for customer to manage their subscription plan (such as upgrade/downgrade the plan), update payment details... etc

pseudo tangle
#

let me check

pseudo tangle
#

where i can manage checkout page in stripe dashboard?

crisp sparrow
#

What do you want to manage for Checkout Session specifically?

pseudo tangle
crisp sparrow
pseudo tangle
#

i saw it

#

but i f upgrade one plan using checkout mail also updated i dont want to update email!!

crisp sparrow
#

Sorry, I don't understand what you meant. A plan can't be upgraded using Checkout. Checkout can only create a subscription, but not upgrading existing subscription.

pseudo tangle
#

okay, but ist update the email also?

crisp sparrow
#

What do you mean by updating the email? What is updating email for?

pseudo tangle
#

in checkout page there is input for email!

crisp sparrow
#

If customer is set during Checkout Session creation, customer won't be able to update the email address

pseudo tangle
#

but i update that email

#

$session = $stripe->checkout->sessions->create(
[
'cancel_url' => 'http://127.0.0.1:8000/',
'line_items' => [['price' => 'plan_N7OtH9opxAc149']],
'mode' => 'subscription',
'success_url' => 'http://127.0.0.1:8000/',
'customer' => 'cus_N9zsdpwJk74sQY',
]
);

#

this is my code

crisp sparrow
#

but i update that email
Do you mean that the Checkout Session page you created allow you to update the email? If so, could you share the Checkout Session ID (cs_xxx), so that I can have a look?

crisp sparrow
pseudo tangle
#

oookk now i understand