#batler2657
1 messages · Page 1 of 1 (latest)
Oh, and the attach card returned array APPEARED like the attach card action was successful / there was no error key in the returned array.
Can you share the request ID (req_xxx) that your system attached the card to the customer? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
One sec...
I'm pretty sure it's this one: https://dashboard.stripe.com/test/logs/req_hZrPgEfxGgNAsO
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah, the fingerprint matches from the tab (I havne't closed that tab): KiLTh2RMEyz5UE89
I can see pm_1NaqR8Cbr9UflH1h9hfPNQGs in https://dashboard.stripe.com/test/customers/cus_ONCfFhBUjc2Jka
This payment method is still attached to cus_ONCfFhBUjc2Jka
Let me re-verify the test files for each function just in case...
If you use List Customer's Payment Method API, you should get the payment methods attached to this customer: https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
https://stripe.com/docs/api/cards/list
{
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/customers/cus_ONCfFhBUjc2Jka/sources"
}
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
List Card API is for legacy Sources. For payment method, https://stripe.com/docs/api/payment_methods/customer_list should be used
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah...I see the disconnect.
Yeah, the documentation is confusing as hell (not your fault).
So I need to revise those functions...
I'll confirm in a few minutes. Thank you for the clarification.
No problem! Happy to help 😄
Okay, I have that working!
So this may or may not be an easy request...
I have six API function calls and I just want to make sure that I'm not using anything legacy so...
If you can confirm that these URLs / API calls are correct or legacy I'd greatly appreciate it...
- https://stripe.com/docs/api/customers/create
- https://stripe.com/docs/api/customers/list
- https://stripe.com/docs/api/payment_methods/customer_list
- https://stripe.com/docs/api/payment_methods/attach
- https://stripe.com/docs/api/payment_intents/confirm
- https://stripe.com/docs/api/cards/delete
...anything legacy here or am I using everything properly?
In item 6, you should use Detach Payment Method API instead: https://stripe.com/docs/api/payment_methods/detach
AH! Thank you! Sorry, hope that wasn't too much of a PITA.
When a PM is detached does it still exist in the system? Or does detaching it remote it outright?
Cards API is legacy and it shouldn't be used. Payment Methods API should be used instead.
When a PM is detached does it still exist in the system? Or does detaching it remote it outright?
When a payment method is detached, it can no longer be used
Okay I got that.
What I'm saying is the payment methods is the latest version...
So when you detach a PM does the PM itself become deleted/lost/etc?
When the payment method is detached, the information can still be retrieved, but it can't be used to process payment or found under any customer.
This works the same as deleting a legacy card
Would I be correct to assume that once detached that payment method can not be re-attached? Mostly just pure curiousity.
After the payment method is detached, it can't be re-attached
That makes sense. I'd just require the customer to enter in a new card or re-enter the old one.
Yup! That's right