#Renato-customize-page

1 messages · Page 1 of 1 (latest)

rugged blade
#

Hi there! Let's chat in this thread.

#

Can you provide the link you mentioned here?

plush lion
#

sorry

rugged blade
#

No problem!

#

Okay so you are trying to customize your success page after a successful Checkout Session?

#

Are you asking if there is a sample already with a pre-built success page?

plush lion
#

Yes.

#

Actually I need to find out how to pass some data to this page, because I need to insert it into the database. The link I sent, when you put it in php it uses the SLIM framework, but here it doesn't work and I didn't need help with that, because the only data I can retrieve on the success page is i session_id, but I have no idea what I can do with it to recover the data I need

rugged blade
#

Gotcha, so with the Session ID you can pass that ID back to your Server from your Client and then retrieve the Checkout Session object itself from your Server using: https://stripe.com/docs/api/checkout/sessions/retrieve. This will give you all the information about the Checkout Session back to you so you can insert what you need to your database.

plush lion
#

Cool, I'll take a look at how I can do it, but I didn't know how I could use the session_id, I'll start looking at the material you sent and I'll say anything again here, can it be? thank you so much for now

rugged blade
#

Sounds great!

plush lion
#

thanks!

plush lion
#

Hello,

#

unfortunately I get error 500

#

when i try to insert this link in sucess

#

*success

#

any suggestion
?

rugged blade
#

Sorry not sure exactly what you mean? You linked to expiring a Session? Why do you want to Expire the Session?

plush lion
#

It got a 500 error on the screen when the page was called, then I managed to fix it by putting the
require 'vendor/autoload.php' but there it goes but the answer is empty

rugged blade
#

Sorry, what do you mean by "the answer"? Do you mean that the page you are redirecting to is just a blank page?

#

If so, that is expected unless you write code for your Success URL webpage.

#

The Checkout Session ID that you get back in the URL is so that you can pass the Session ID from your client-side code to your server-side code and then retrieve the Session via the API to get the details about the Session.

#

This won't inherently show anything on your Success webpage.

plush lion
#

Okay, so I need to go through this page localhost:4242/webhook

? to can access? I didn't quite understand where I can put the session_id and get the request data

rugged blade
#

Are you planning on using Webhooks or are you planning on using the Checkout Session ID from your Success URL? These are two different routes and you only need to do one of them.

plush lion
#

yes, I think it's the most correct, because I'm dealing with recurring payment so I need to receive this update in the order status and update it in the bank too

lunar siren
#

Hello! I'm taking over and catching up now...

#

It sounds like you're trying to build a Checkout integration that starts Subscription payments and you're trying to listen to events using a webhook endpoint, is that correct?

plush lion
#

Great! This, starting, because the integration with the checkout is already ok, now I need to retrieve the data to insert into the database, and then there will be the update part too, in case the customer cancels, update in the database automatically

lunar siren
#

Okay, so what specific part do you have a question about?

plush lion
#

The question is, after the customer pays, I need to enter the data in the bank, but I am not able to understand and develop this part

lunar siren
#

In the bank?

plush lion
#

sorry, database