#domhacking
1 messages ยท Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Hey @graceful edge , req_JVwRE4GvLDpAhv
That is of the payment intent
Sorry to be more clear that is from when I call the collectPaymentMethod
So the paymentIntent is created server-side
Yep, I can see that. I'm interested in the request that throws the error you shared
pi_3MjLBhFP59uQwdcO1FEJKUGU belongs to acct_1MTjblFP59uQwdcO. I'd guess you're attempting to use collectPaymentMethod using the keys of a different account
Not intentionally
Perhaps not, no! Just want to confirm that is correct
So sorry I am a bit confused. You can see that I doing calls from different accounts? e.g the create_token from one account and the payment_intent from another?
This is the request id for the attestation/bind: req_1oUy72inHIajZ3
Ok cool ๐
I can't see that no, but that's what I suspect as that's generally what that error indicates. I need to see the req_xxx for the error to confirm
yeah
Well, that req_xxx is from the same account and isn't an error
yup
so will the collectPaymentMethod show in the logs?
If I am calling the right account?
Well, it should yes
๐ค
OK
But I am not sure how I can be setting a different account if you can see the create_token is calling the right account.
How can the collectPayment be calling a different account?
I don't know, hard to theorise without more context and/or seeing code.
but looking at the documentation the only place to see the account is the StripeTerminalProvider
Is there a way I can share my code with you?
Yeah, just paste it here.
Just the part where you invoke the provider I guess
And the code that calls collectPaymentMethod
Can you share the usePostCreateConnectionTokenMutation function?
Can you share the backend code please?
I dont have access to it.
I mean I could ask someone in the team.
I have asked for it.
Will share when I have it.
Sorry if the code is tricky to read
Eh, this is very convluted
My guess is the connection token is being created with the wrong keys
i.e. when you initialise you backend Stripe client
But if you think that is the case how could I see the backend call on the logs?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I can see /v1/terminal/attestation/bind
But then I cannot see the collectPayments
Exactly, so somewhere in your code is using mismatching keys and/or a Stripe-Account header is being passed
Unfortunately it's too busy right now for me to filter through all that code and find the relevant parts. Can you pull them out?
Sorry I have another questions:
I can see the connection_tokens being called 3 times. Does that matter do you think? Will the /v1/terminal/attestation/bind Just take the latest secret key?
I don't think that's related to your current issue no
ok thanks
Hi @graceful edge , Sorry to bother you. I dont see anything to the network tab when the collectPaymentMethod is called which means that an api call is not made. Could this be due to the fact that this is a simulator and I need to set the test card details?
There may not be depending on your Terminal integration
I see in the example code that we need to setSimulator and test card details in the payemnt intent if that is handled in the front end.
We are using Tap to Pay Android
Do you have the code for your Terminal connection token yet?
StripeConfiguration.ApiKey = Constants.StripeAPIKey;
var options = new PaymentIntentCreateOptions
{
Amount = Utility.ConvertAmountToFlatInt(amount),
Currency = currency.ToLower(),
//Confirm = true,
Description = description,
PaymentMethodTypes = new List<String> { "card_present" }, //Card present
//PaymentMethod = "card",
CaptureMethod = "automatic", //Automatic capture type
Metadata = metaData
};
Oh yes sorry
2 secs
public ConnectionToken? GetTerminalConnectionToken()
{
StripeConfiguration.ApiKey = Constants.StripeAPIKey;
var options = new ConnectionTokenCreateOptions { };
var service = new ConnectionTokenService();
var connectionToken = service.Create(options);
return connectionToken;
}
Hi! I'm taking over this thread.
I would recommend you to contact Stripe support directly who would have more time to investigate: https://support.stripe.com/contact
Make sure to include the exact error message you see, the PaymentIntent ID, and relevant code snippets.