#deepakkumar_wizniche
1 messages ยท Page 1 of 1 (latest)
Hey there
Hey bismarck
PaymentIntents are backwards compatible so you can use the payment_method param to pass the Card ID
What is card ID here?
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?
Look at the response to your token creation request: https://dashboard.stripe.com/test/logs/req_qUQ115LgiVNcQa
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
Oh okay
{
"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
Can you share that error request ID?
Whats the request ID? eg req_123
thanks, looking
thanks
PaymentIntents are backwards compatible so you can use the payment_method param to pass the Card ID
thats what I was told
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
how?
yes
You used an acct_1L... you make the request that errored
That card belongs to a different acct_1G...
What can I do to fix this?
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
A source must be attached to a customer to be used as a payment_method
whats this error
You have to attach a source in order to use it as a payment method: https://stripe.com/docs/api/sources/attach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.