#usama
1 messages · Page 1 of 1 (latest)
Hi. Can you share the request id where this happened?
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.
https://api.stripe.com/v1/charges
this is the endpoint
how can i find request id?
Look at the link I shared above
sure
req_68fG3uTPtiSf6s
hi, this is the request id
hi where are you, i am waiting.
You need to be patient. There are tons of other folks I'm helping too
sure
That request was just a declined charge
"Your card was declined. This transaction requires authentication.",
yes, but the issue is its not picked the customer default card that is 4242.
its picking the "0341" old card which is not default card.
That's because you're manually passing the card: https://dashboard.stripe.com/test/logs/req_68fG3uTPtiSf6s
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You pass source: card_1NBhLXLKHXrDeJhEiimotKB7
Which is the old card
So that's the one that will be used in the charge
not i passed the customer id.
Look at the link I sent you
It's using the source you manually specified
That's why
oh i see, error is the loging in that case
req_b3FaxqogfQ4ldc
can u check this, i only passed the customerId
not the source.
Request body
{
"currency": "usd",
"customer": "cus_NuYPOo95UmeHxU",
"amount": "1059",
"capture": "False"
}
Oh it's because the default_source on the customer is card_1NBhLXLKHXrDeJhEiimotKB7
The Charges api (which is legacy) checks default_source first
If you retrieve the customer: https://stripe.com/docs/api/customers/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You'll see default_source is the other card: https://stripe.com/docs/api/customers/object#customer_object-default_source
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Recommend using PaymentIntents really. Charges isn't recommended anymore
but in the dashboard its showing the other default card.
with the PaymentIntents, can i check that customer has sufficient balance in card before the charge?