#nimish-tank_code
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.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ 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/1311912790641872987
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- nimish-tank_code, 18 hours ago, 5 messages
- nimish-tank_webhooks, 19 hours ago, 11 messages
hello
Do you mean checking the card is default on a specific customer?
You can check the customer's invoice_settings.default_payment_method
I have retrieve these customer detail but cus_RHZeCjdyYV6W6o but give the error Error: No such customer: 'cus_RHZeCjdyYV6W6o'
You want to check if that customer belongs to your account or your connected account
it's a common error when you forget or unexpectly using the Stripe account header
public function check_default_card() {
\Stripe\Stripe::setApiKey($this->config->item('STRIPE_SECRET_KEY'));
$paymentMethodId = 'pm_1QP0VpIErBwOu8QACw2zMzhN';
try {
// Retrieve the customer object
$customer = \Stripe\Customer::retrieve('cus_RHZeCjdyYV6W6o');
echo "<pre>";print_r($customer);die;
} catch (\Stripe\Exception\ApiErrorException $e) {
echo 'Error: ' . $e->getMessage();
}
}
this are my code
What account that you are using secret key from? acct_xxx