#irfanullah_connect-customer-paymentmethods

1 messages ยท Page 1 of 1 (latest)

tulip grailBOT
#

๐Ÿ‘‹ 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.

gentle ospreyBOT
#

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.

round canopy
jolly bear
#

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;

round canopy
#

Or a Checkout Session ID would work too. That will start with cs_

#

Just the ID's please

jolly bear
#

acct_1OSa5uC0wiqTfzk5
cus_PNbkUIBmefytXN

round canopy
#

Thats an account ID and a Customer ID. Is that the Customer you want to find the cards from?

jolly bear
#

I have created a page where I want to show these customer saved cards

#

means payment methods

round canopy
#

Okay what are you trying?

#

What API request are you making and what is the error you are receiving?

jolly bear
#

actually, on the checkout session element showing 1 card but on another page showing three cards

round canopy
#

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?

jolly bear
#

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

round canopy
jolly bear
#

Okay, thanks.

gentle ospreyBOT
#

irfanullah_connect-customer-paymentmethods