#formigueiro

1 messages · Page 1 of 1 (latest)

bold duneBOT
sturdy field
#

Hello

#

Yep, after you create a Checkout Session then a URL is returned to you and you redirect your customer to that URL

strong crane
#

whats that value?

#

come from const session ?

sturdy field
#

You leave that value as-is and we append the Checkout Session ID to your success_url

#

Err sorry

strong crane
#

I didnt understand, sorry doesn't there need to be anything there?

#

oh, i found here

#

so i need to keep like that http://yoursite.com/order/success?session_id={CHECKOUT_SESSION_ID}

sturdy field
#

Yep

strong crane
#

If I configure the cancel page, directly on the platform, I need to put also in stripe.checkout.sessions.create too, right

sturdy field
#

Yep that would be the page that the customer would be sent back to if they leave the Checkout Session via the "back" button for instance

strong crane
#

If I have already configured it through the platform, do I still need to send it here?

sturdy field
#

Not sure what you mean by that?

#

Stripe Checkout is a standalone hosted page

strong crane
#

is it not possible over plataform configure success and error page, or am i crazy? hehe

sturdy field
#

Not possibe. It is a required param when you create the Checkout Session

strong crane
#

hm, ok

sturdy field
#

Ah actually sorry, cancel_url is not required

#

But success_url is required

strong crane
sturdy field
#

But you can't have a "default" for cancel_url

#

You have to set it explicitly if you want there to be a "back" option

strong crane
#

I don't understand how on my front end I will send the user to the checkout page?

#

using session.url?

sturdy field
#

Yep

#

So you can either redirect directly from your server, or you can pass that URL to your client and redirect client-side. Either works.

strong crane
#

so in my front with success, i redirect user to this session.url

#

nice

#

ty @sturdy field , you are amazing

sturdy field
#

Yep

strong crane
#

subscription I can only do one at a time, right?

sturdy field
#

One Checkout Session creates one Subscription, yes.

#

But a Subscription can have multiple items if you want

strong crane
#

It is not possible to add to a cart and in the end subscribe to all

sturdy field
#

Yes you can do that

#

line_items is an array

strong crane
#

really?

#

hm

sturdy field
#

You can have multiple line_items as long as they have the same recurring interval (like they are all monthly)

strong crane
#

Will the checkout page have everyone's information?

sturdy field
#

What is "everyone's information"?

strong crane
#

oh sorry

#

On the strip checkout page, we will have data for each subscription (values,...?

sturdy field
#

Still not sure what you mean by that, sorry.

#

The Checkout Page will show data based on what you input on your Checkout Session creation.

#

Really the best thing to do is to test this out in test mode and experience the flow for yourself

strong crane
#

If i send 5 subscription, fro example, as a said. All subscription info will be displaying in this page

#

?

sturdy field
#

If you include 5 line_items in your request then yes.

#

You can't "send 5 subscriptions"

strong crane
#

yeah, that i mean, 5 items on line_items array

#

ty

sturdy field
#

Sure