#deepakkumar_wizniche

1 messages ยท Page 1 of 1 (latest)

steep runeBOT
tidal notch
#

Hey there

worn mural
#

Hey bismarck

tidal notch
#

PaymentIntents are backwards compatible so you can use the payment_method param to pass the Card ID

worn mural
#

What is card ID here?

tidal notch
#

card_xxxx

#

It is what is returned from the token

worn mural
#

No such PaymentMethod: 'tok_1LpcOgI0FYDGs7q9wW7G4ciV'

#

oh okay

#

brand
:
"Visa"
exp_month
:
2
exp_year
:
2023
number
:
"4242"
token
:
"tok_1LpcUKI0FYDGs7q9nAZ8r7Ku"
type
:
null

#

my card doesn't return any id?

tidal notch
#

But, let's also back up

#

Why are you creating Tokens?

#

And not PaymentMethods?

#

If you are going to create Tokens then the Promise will resolve with a Token object which will contain a card.id property

worn mural
#

Oh okay

worn mural
#

{
"payment_method": "card_1Lpd7mI0FYDGs7q9oHq0Pj46",
"description": "{"invoice_number":"202210051","appointment":389,"label":"Appointment Payment"}",
"amount": "100",
"currency": "usd"
}

#

why does this error now?

#

It says no such payment_methods

fiery trench
#

Can you share that error request ID?

worn mural
#

where can I find that

#

Does this help?

fiery trench
#

Whats the request ID? eg req_123

worn mural
#

req_C8OMeMCgJw8nFD

#

here

fiery trench
#

thanks, looking

worn mural
#

thanks

#

PaymentIntents are backwards compatible so you can use the payment_method param to pass the Card ID

#

thats what I was told

fiery trench
#

Yes, the issues here is it looks like you might be mixing up your test accounts

#

that card exists on a different account from the one you used to make the request you shared

worn mural
#

how?

fiery trench
#

Wrong API key, most likely

#

You have multiple accounts, yes?

worn mural
#

yes

fiery trench
#

You used an acct_1L... you make the request that errored

#

That card belongs to a different acct_1G...

worn mural
#

What can I do to fix this?

sick needle
#

Hi there ๐Ÿ‘‹ taking over for @fiery trench

You'll likely need to make the request using the API key that is associated with the correct account or (if it's a Connect account) you'll have to pass in the account header as described here: https://stripe.com/docs/connect/authentication

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

worn mural
#

A source must be attached to a customer to be used as a payment_method

#

whats this error

sick needle
worn mural
#

I have already attached the source

#

Customer does not have card with ID card_1Lpe3DRMIaqLm2It71eKcTX5

#

req_0js6MLNo9EYHwS

#

can you look at this request