#Bentley-setup-intent
1 messages ยท Page 1 of 1 (latest)
Thank you. I didn't see a way to create a thread lol.
My question is about feasibility. Is it simply a matter of passing back the data gathered by the Stripe elements to the backend? The reason we're facing this is because we're allowing the user to save an associated nickname with the payment method and we need to enforce uniqueness in the backend before we commit the intent.
Stripe Elements is intended to pass raw info (e.g. PANs and PII) directly to Stripe from the client. Once your client receives a response from Stripe, then you can pass that response data to the back-end.
If you're including a nickname for the payment method, you might consider including that as metadata on the payment method object so that your local database and Stripe can stay synced: https://stripe.com/docs/api/payment_methods/update#update_payment_method-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
In terms of enforcing uniqueness, you may want to wait until after the payment method is created
We intended to include it in the metadata, but then ran into the unique constraint issue.
If we handle the confirmation in the backend will we run into any issues with requires_action or will those actions have already been resolved when we get the response from Stripe?
I'm not sure I understand the question. The requires_action is on the Payment Intent or Setup Intent objects, but up until now we've only been talking about the Payment Method object
Also, are you using webhooks to manage the lifecycle of a payment/customer?
That was our plan, but we're second guessing that.
Sorry, I know I'm mixing concerns. To us the payment method is an inherit child of the SetupIntent, so I'm not doing a good job of separating them in my head.
I would absolutely use webhooks if you're intending to handle transitioning the state of the payment intent on your own. I wouldn't treat them as parent/child, as they exist separately and can be used with other products and objects.
Okay, so if I'm understanding this correctly if we confirm the SetupIntent in our backend we run the risk of running into status = requires_action in the response?