#yamakasi_api

1 messages ¡ Page 1 of 1 (latest)

tame schoonerBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1267607238726389770

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

fervent rock
#

Hi there

#

Taking a look

#

payment_method_data.card.token expects a Token object. The value should begin with tok_...

robust dagger
#

That's the only problem?

fervent rock
#

Let's take a step back. I see you're using the iOS SDK to confirm this PaymentIntent. Your logs show a few different integration flows (adding tokens as customer sources, using the split card element).

#

You also mentioned your colleagues are "succeeding" with your account. Do you have an example request ID for one of their attempts? Just want to understand what you're comparing

robust dagger
#

Can't find the exact request, but that's is the strange part. I also tried with the colleague account, but still got the same invalid token id error despite i was using his card. So i only placed the order

#

I will try to find

tame schoonerBOT
robust dagger
#

Okay, i couldn't find the exact request log, but what i did is instead of passing card token id, i hardcoded number, cvc, expYear and expMonth and now 3DS sheet is opened.

#

For the first glance, what could be the issue in your ophinion?

lethal skiff
#

Looks like the Card token ID you used is attached to a single-use card that was already consumed when you attempted to confirm it. Why are you confirming it again?

robust dagger
#

I'm using the test card which has one time passcode challenge 4000000000003238. Not sure what "already consumed" means. After every "buy" request it shows invalid token id error, which i'm not sure why happens. But with hardcoded card number cvc ... 3DS sheet is presented.

lethal skiff
#

Consumed means that a single-use token was already used prior to the attempt. Since it only gets one use, you can't confirm it again.

#

Can you try creating a new one, then attempt to capture a payment with it?

robust dagger
#

Getting this error

Error Domain=com.stripe.lib Code=50 "There was an unexpected error -- try again in a few seconds" UserInfo={com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:StripeErrorCodeKey=, NSLocalizedDescription=There was an unexpected error -- try again in a few seconds, com.stripe.lib:ErrorParameterKey=token, com.stripe.lib:ErrorMessageKey=Invalid token id: card_1Pi2Y3HXPWlCZA44p20nnK5V}

#

Not sure how token is used, cause the same code work other developer, but in my case this happens :d

lethal skiff
#

Do you have a Request ID for that request?

robust dagger
#

should be this one - req_oeN68U6uTOhfmy

lethal skiff
#

Why are you confirming the Payment Intent? When you attached the Card to the Customer, it was already confirmed, so all you need to do here is capture the Payment Intent as far as I know

robust dagger
#

All i do is from the ios app to select a card and tap "buy".

theen, i pass token id to

public func confirmPayment(
    _ paymentParams: STPPaymentIntentParams,
    with authenticationContext: STPAuthenticationContext,
    completion: @escaping STPPaymentHandlerActionPaymentIntentCompletionBlock
) {
#

And for the other developer this is working. I can't find the log, but it works. So that's why i'm confused

lethal skiff
#

What docs are you following right now?

#

Can you link this method somewhere in the docs that I can look at?

robust dagger
lethal skiff
#

Can you try passing in the Token ID instead of the Card ID? So instead of card_abc123 use tok_xyz321. You can see an example of where those 2 types of IDs exist if you look at the example object here: https://docs.stripe.com/api/tokens/create_card