#papiwablo - additional cards
1 messages ยท Page 1 of 1 (latest)
hey again
ive got the setup intent stuff working with my backend folks. we want to test multiple card scenarios, so we need to add multiple cards
whats the recommended best practice to add multiple cards for future use?
Hmmmm...I think I read something on that just this morning. Let me check.
Sorry that was related to Checkout Sessions.
So what is the scenario you are wanting to test? A single customer with multiple cards?
All saved for future use?
Hi okay, looking into this.
i was hoping a setupintent over and over again would do
I was just about to test that.
I don't see anything specifically saying you can't
Actually I'm pretty sure you can based on one of my test customers
does it override the default card?
It does not.
then its gotta be failing on the ios side with the drop in code examples
ill have to pull the error for ya -- but it says somethign to the effect of "setupintent has already happened so it cant happen again"
when clearly you just did a bunch of setup intents
Okay but that error sounds like the code may be trying to re-use the setup Intent.
BTW I just created another one with a different expiration date to double check the overwrite on the default. Default is still the same:
ok great
so i think this points me in the correct direction to start
at least i know the best practice for setup intent over and over is the best practice for adding additional cards
Yeah, I would just make sure a new SetupIntent is being created for each new card.
can we keep this thread open and let me get back to you with the error?
I'll be hopping off but @lethal grove will be here
๐
hi there -- ill pop open ye macbook here shortly
Sure
At a quick glance, I think your error occurred when you retried a SetupIntent. SetupIntent only can be confirmed once (it's one time object), but you def can create multiple SetupIntent to add multiple Card to a same Customer
And it is not overriding default for sure
so i think you are correct
2022-01-26 17:39:22.428360-0600 nom[50885:691221] LOG ANALYTICS: ["bindings_version": "21.7.0", "event": "mc_complete_init_customer", "os_version": "14.4", "additional_info": [], "apple_pay_enabled": 1, "device_type": "x86_64", "app_version": "1.0", "publishable_key": "pk_test_51JDWTTL6jsOpWNAQGXADflKOrNobu3QpR1vyc3Hsdy84K16G9NGBfnTcfK2HMYMF3y8LSpuuPhWWJxLHxWi8F34V00YvPoRlf9", "ui_usage_level": "partial", "analytics_ua": "analytics.stripeios-1.0", "app_name": "nom", "is_development": true, "ocr_type": "none", "product_usage": ["PaymentSheet"]]
Payment failed: unknown(debugDescription: "PaymentSheet received SetupIntent that is already completed!")
the reason for this, is when a new user logs in, we auth with Cognito, and then automatically kick off a setupintent on the back end and those credentials are forwarded to me and then i capture the card info and send it to you guys so my back end guys can set it up to charge once an order has been verified complete
so each setup intent requires a new setupIntentClientSecret, customerEphemeralKeySecret
Yes
np and good luck ๐