#renraj-server-side-subscription

1 messages ยท Page 1 of 1 (latest)

ember gyroBOT
fossil bolt
#

Hi

So what I have to do from API side to make that payment, when they click on "Pay Now" button ? How I can confirm this payment from API side?
If the customer already did the payment, what you mean by confirm the payment from API side?
The recommended Subscription integration is to follow this guide:
https://stripe.com/docs/billing/subscriptions/build-subscriptions

civic pagoda
#

Hi ... I mean after customer entered the CC details and click "Pay now" button, what all steps we need to make that payment to confirm. As per our design, frontend team will make an API call to confirm that payment. Is it okay to send back the SubscriptionId,clientSecret and token(based on CC details)?

fossil bolt
civic pagoda
#

Yes we followed the same link upto Step 5. We use backend as C#, created Susbcription and returned ClientSecret to FrontenedTeam. They customised the Stripe CC page using the client_secret. Now the next step is, once teh customer enters teh CC details, instaed of confirm the payment from Frontend, how we can do the same from c# backend ?

fossil bolt
#

No you can't confirm the payment from backend following that guide. If you want to create a Subscription from the backend 100%, you need to first collect the PaymentMethod (e.g. using SetupIntents) and then create the Subscription in the backend using that PaymentMethod Id.

civic pagoda
#

Is there any link to follow that?

#

Here we are facing issue is that, Frontend team needs client_secret, to get stripe theme related to CC entering detail page. So due to that backend team, creates a subscription(which is incomplete as there is no payment done so far) based on Product they chose and give the client_secret to get the theme. After that only user, enters CC details and click "Pay now". That "Pay now", we need to do the confirmation from c# backendside

fossil bolt
civic pagoda
#

not sure whether u have seen this message. I am reposting
Here we are facing issue is that, Frontend team needs client_secret, to get stripe theme related to CC entering detail page. So due to that backend team, creates a subscription(which is incomplete as there is no payment done so far) based on Product they chose and give the client_secret to get the theme. After that only user, enters CC details and click "Pay now". That "Pay now", we need to do the confirmation from c# backendside

fossil bolt
#

yes saw that,

we need to do the confirmation from c# backendside
When using SetupIntent, you've already collected the PaymentMethods, so here in the backend you create the Susbcritpion with the PaymentMethods Id as default payment method

harsh forge
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

civic pagoda
#

Hi
Is that the client_secret, we get while creating SetupIntents, can use to get Stripe themes for FrontendTeam?

harsh forge
#

I'm not sure I follow, would you mind elaborating?

civic pagoda
#

This is the message
Here we are facing issue is that, Frontend team needs client_secret, to get stripe theme related to CC entering detail page. So due to that backend team, creates a subscription(which is incomplete as there is no payment done so far) based on Product they chose and give the client_secret to get the theme. After that only user, enters CC details and click "Pay now". That "Pay now", we need to do the confirmation from c# backendside
Here support staff asked me to create SetupIntent first and later Subscription. So my question will I get some client_secret after SetupIntent, so my frontend team can use that for getting theme

harsh forge
#

Here support staff asked me to create SetupIntent first and later Subscription. So my question will I get some client_secret after SetupIntent, so my frontend team can use that for getting theme
I disagree with this approach

#

you don't need to confirm the payment from the backend

#

once the details are collected from the frontend Stripe will automatically collect the payment for the Subscription's first Invoice

#

you don't need an extra step for that

civic pagoda
harsh forge
#

why do you need to?

#

what does it change for you?

civic pagoda
#

Instaed of doing this from frontend, Is there anyway make this design completely handle via c#backend

harsh forge
#

you haven't answered my question, why do you need it to be a backend confirmation?

civic pagoda
#

As per our previous design, we havn't used any theme for the CC card page. So from that "Paynow" button, the backend team is completely handling stripe related things. Now as per new design, we need to setup the stripe theme in the CC page, so we create the subscription(as incomplete since user didn't entered the CC details) first to get client_secret" and given to frontend and later on "Pay now", we have seen client side command to confirm payment. But just asking anyothere way to make that too via c#backend.

vale robin
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needed to step away. I'm working on reviewing the thread and building context, but if there is an outstanding question that I can address then please let me know.

civic pagoda
#

Hi ..please go through and let me know

vale robin
#

renraj-server-side-subscription

civic pagoda
#

Hi tobby
We followed https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
upto step 5. Now frontend got client_secret and they customized the page using Stripe theme. So now only the user enters the CC details and click on "pay now" button. From the link I can see that frontend team need to follow step 6 .
Is there any option to do the Stripe related things from c#backend side once user enters CC details as we have SubscriptionId and clientSecret can pass to c#backend ?

vale robin
#

Yes, you can confirm the associated intent server-side, to do so you will follow the guide that I provided instead of the one you're referencing that uses client-side confirmation.

civic pagoda
#

But in that I couldn't see a way to get client_secret before entering CC details or confirm subscription. We need that secret to customise the theme of that page

vale robin
#

You don't need a client secret to customize the theme of the Payment Element, that is done via the Appearance API and can be done without first creating a Subscription. The last piece of sample code in Step 3 has a placeholder for where you can pass your appearance settings.

civic pagoda
#

how we can get that clientSecret ?

vale robin
#

This is the sample code snippet I'm referring to from the linked doc:

civic pagoda
#

Thank you Tobby... let me check that with my team. thank you for your understanding. Really appreciable

vale robin
#

Any time!

ember gyroBOT