#praful0512

1 messages · Page 1 of 1 (latest)

slate jacinthBOT
#

Hello praful0512, 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.
praful0512, 0 days ago, 15 messages
praful0512, 4 days ago, 15 messages

kindred citrus
#

Hello, can you send me the ID of the Checkout Session tha tyou are seeing this on?

winged hound
#

cs_test_b1lJhcU8sOfBw7lu5yYJgFMJzsjRHGvhNcKteDgUVnEzFQ44fL5uXzI1XA

#

hi, are you there?

kindred citrus
#

Yes but the server is very busy

#

Typically on this server there will be a bit of a wait for responses when it is busy

winged hound
#

okay thanks..

kindred citrus
#

Unfortunately I am having trouble looking up that Checkout Session

#

Can you send me your code for how you create this session and how you are trying to get the client secret?

slate jacinthBOT
winged hound
#

var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.stripe.com//v1/checkout/sessions',
'headers': {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer token'
},
form: {
'cancel_url': 'https://example.com',
'success_url': 'https://example.com',
'customer_email': 'Beduggerr+12@gmail.com',
'line_items[0][price]': 'price_1NpUa5SFSc1Kz6ix2vN9BTu3',
'line_items[0][quantity]': '1',
'line_items[1][price]': 'price_1NpUU7SFSc1Kz6ix7E8qkBis',
'line_items[1][quantity]': '1',
'mode': 'subscription'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

kindred citrus
#

Ah, in subscription mode checkout does not immediately create a subscription so there is no client secret immediately as far as I know

#

Taking a step back, can you tell me more about what you are trying to do here? Are you integrating with the embedded checkout element? Or do you need the client secret for something else?

winged hound
#

like we are trying to create a payment platform in react native using stripe platform but in react native sdk there is no privelege for checkout session so we are trying to creating checkiut session through backend apis for that we need to create the client secret so that through webhook we can update our internal db

humble jungle
#

👋 I see you're trying to use Checkout with React Native. Are you using WebViews to render the checkout session?
Just trying to make sure I understand your usecase

Aside from that, have you looked at some of our native components on React Native like Mobile Payment Element to see if that fits your usecase?
https://stripe.com/docs/payments/accept-a-payment?platform=react-native

winged hound
#

yeah i'm trying to use webview to render checkout session

#

yeah i had already explored the documentation link you just provided but it doesn't meet our usecase..can you help to resolve the client secret issue

humble jungle
#

As my colleague already mentioned, we don't generate client-secret until the subscription has been created and the invoice has been finalized.

Which happens after checkout session is completed. So there's no way for you to get this info at creation time.

Why is it important to update the DB at creation time? Can you elaborate?

winged hound
#

Like in db we update it at time of success

#

Then how can we integrate the checkout session in react native sdk

humble jungle
winged hound
#

So in react native we need to follow the same steps we followed in web?

humble jungle
#

Correct. Since you're using a webview, there's nothing mobile specific you're doing really

winged hound
#

Can you share the web related doc for it.. To check the steps

humble jungle
#

We don't have any docs for this as typically we see folks use mobile payment element with React Native

winged hound
#

no for the web side for handdling checkout session