#shubh_99

1 messages · Page 1 of 1 (latest)

junior harborBOT
reef barn
#

👋 Let's chat here

halcyon lodge
#

Hi

#

Sir

#

req_aoYeZznvZIX76v this is id can you tell me what is error

#

Are you here

reef barn
#

If you check the logs, the error is pretty self-explanatory

halcyon lodge
#

No

#

I not understood i recently update from v2 to v3 just tell me error

reef barn
#

When you say updated from v2 to v3, what are you referring to exactly?
What did you update?

halcyon lodge
#

Just tell me error

#

Does line_2 is missing because of that?

#

Tell me just

#

This what is missing exact error

reef barn
#

The error is

  error: {
    code: "resource_missing",
    doc_url: "https://stripe.com/docs/error-codes/resource-missing",
    message: "No such token: 'tok_1NXQkaSCQQ84qVMJtDNmzFP5'",
    param: "source",
    request_log_url: "https://dashboard.stripe.com/test/logs/req_aoYeZznvZIX76v?t=1690212765",
    type: "invalid_request_error",
  },
}
#

No such token: 'tok_1NXQkaSCQQ84qVMJtDNmzFP5'

#

The token you're referrencing in the request belongs to a different account

halcyon lodge
#

Oo no why this error i have used all of same account

#

This is payment.js

#

And this is process file see api details are same

junior harborBOT
halcyon lodge
#

So tell i have used api details of same account only

#

See

#

Hello

#

Anyone can please help me

#

Hello

reef barn
#

Please be patient, there are multiple users we're working with on discord

halcyon lodge
#

Ok

#

So wait let me test again

timber plover
#

Hello! I'm hopping in here - and again, please be patient. We're helping multiple people in parallel

halcyon lodge
#

This is payment.js file see api details

#

This is process file

timber plover
#

I don't need to see you're code right at this moment

halcyon lodge
#

Api details are you one account

timber plover
#

(also i went ahead and deleted them since they have your api keys in them - they're just the test keys, but stll would recommend rolling them when you get the chance

halcyon lodge
#

Ok

#

But they are same and you are saying

timber plover
#

No, those keys belong to two DIFFERENT accounts

halcyon lodge
#

No way sair they are same

timber plover
#

your publishable key is for one account, and your secret key is for another

halcyon lodge
#

No

#

They are of same account

#

I have checked many time

#

You can also

timber plover
#

Are you 100% sure the client-side code from your screenshot is the one that's running?

halcyon lodge
#

Yes 100%

timber plover
#

Can you add some logs and confirm that you're running the code you expect?

halcyon lodge
#

Sir

#

Ok

#

So now i can add a log but it will fail

#

So i should add now?

timber plover
#

Yeah go ahead and add it

halcyon lodge
#

I have added it

#

req_lebcJYBAglNlzB

timber plover
#

What log did you add client-side? ARe you seeing that in the browser console?

halcyon lodge
#

Yes

timber plover
#

Is there anywhere in your code that you're creating tokens? Right now your client-side code is creating PaymentMethods - so it's impossible that the token that's being creating is coming from this code

halcyon lodge
#

Means

#

I am creating

timber plover
#

You need to find where in your code you're creating a Token because that will be where the wrong API key is being set

#

The code you already shared is NOT where the token is being created

halcyon lodge
#

I am creating in payment.js file and

#

All are correct

#

Please you can check my code?

timber plover
#

The payment.js file doesn't have any code that creates a token

#

It calls createPaymentMethod which creates a PaymentMethod, not a Token

halcyon lodge
#

So how to do that

#

Can you please provide an example code

timber plover
#

Let's back up

#

You need to find where in your code you're creating Tokens - that's the first step

#

If you don't change that code you'll keep getting errors like this