#Uniext - Subscription Flows

1 messages · Page 1 of 1 (latest)

quaint ember
minor mirage
#

Ah, so it seems I first create a subscription with payment_behavior=default_incomplete, whilst also providing a payment method id to default_payment_method. Then the pending_setup_intent will be non null and I handle it if it has problems?

quaint ember
#

Yeah

#

Sorry, just to clarify, what do you mean by "handle it if it has problems"? The creation of the subscription?

minor mirage
#

By that, I mean if the pending_setup_intent has any authentication or authorization errors. Like if its status becomes requires_action or requires_payment_method.

quaint ember
#

Oh ok I see

#

Yeah you could then check the status and handle it accordingly

minor mirage
#

Okay thank you. So if you had an authentication error, that being the pending_setup_intent's status is requires_action, how would you handle it on a platform that is not web bases or has any available stripe sdks. More specifically this docs (https://stripe.com/docs/billing/subscriptions/overview#authentication-failures) specifies that we should call confirmCardSetup on your frontend, but this appears to be a js library. Is there any restful api we can call, this would allow me to confirm from another language, like rust.

Learn how subscriptions work within Stripe.

quaint ember
#

If the status is requires_action, then the suggested next steps will be within next_action

minor mirage
#

I understand that I can call this to confirm a setup intent, but, correct me if im wrong, this seems to be only possible from the backend. Is there any way to call this from the front end, like what is done with confirmCardSetup , but for non js or sdk platforms?

quaint ember
#

Sorry what platform are you interested in confirming this on? Is this for a mobile environment?

#

Just confused because you say you want to do this from the front-end on a non-js platform

minor mirage
#

Oh okay. This platform isn't mobile. The platform will be a linux, where the front-end is programmed in rust. I was hopeing there was some sort of RESTful api I could just make requests to.

quaint ember
#

You can make the API call to confirm a setup intent from the front-end and use your public key. However, if you go this route of implementing your own front-end in Rust for a desktop application, you are going to have strict PCI compliance standards you'll have to abide by. That's the advantage of using Stripe Elements with the JS front-end. Stripe takes care of all of those concerns. https://stripe.com/en-gb-sg/guides/pci-compliance

Here’s a step by step guide to maintaining compliance, and how Stripe can help.

minor mirage
#

Does this strict compliance only matter because we are exposing confirmation via the front end?

quaint ember
#

PCI compliance applies to all online payments. If you need some more background as to what it is, in addition to our article above, you can go here: https://www.pcisecuritystandards.org/

#

But yes, it is because you are taking in sensitive card data in a front-end and could be exposing those details

#

The issue is that you are collecting raw credit card info in your form rather than through Stripe's PCI compliant method with Elements