#irfanullah_connect-customer-paymentmethods
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1213194994219876413
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- irfan-ullah_code, 2 days ago, 14 messages
Hi ๐
SO you create a Checkout Session on your Connect Account? Can you share a request ID that shows this?
It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
public function includStripeCardAll($connected_account_id, $stripe_customer_id) {
$stripe = new StripeClient($this->secret_key);
// Specify the connected account ID
try {
// Retrieve the customer object from Stripe using the connected account ID
$customer = $stripe->customers->retrieve(
$stripe_customer_id,
[],
['stripe_account' => $connected_account_id]
);
// Retrieve all payment sources for the customer
$payment_methods = $stripe->paymentMethods->all([
'customer' => $stripe_customer_id,
'type' => 'card'
], ['stripe_account' => $connected_account_id]);
// print_r($payment_methods);
// exit;
Or a Checkout Session ID would work too. That will start with cs_
Just the ID's please
acct_1OSa5uC0wiqTfzk5
cus_PNbkUIBmefytXN
Thats an account ID and a Customer ID. Is that the Customer you want to find the cards from?
I have created a page where I want to show these customer saved cards
means payment methods
Okay what are you trying?
What API request are you making and what is the error you are receiving?
actually, on the checkout session element showing 1 card but on another page showing three cards
Please check the file through this function, I am getting the saved cards.
I need you to be able to tell me what you are doing. I am helping multiple people here so I can't spend time looking through your code myself.
What API requests are you making?
What response are you getting?
How is it different from what you expect?
Okay, Please can you send the API where I can get the customer save cards under the connect account and also please send the delete API for this customer.
Thanks
You can list the Payment Methods for a Customer using this API: https://docs.stripe.com/api/payment_methods/customer_list
And you can delete a Customer with this API: https://docs.stripe.com/api/customers/delete
Okay, thanks.
irfanullah_connect-customer-paymentmethods