#Sam_Praveen-customers
1 messages ยท Page 1 of 1 (latest)
Hi ๐ it's not possible to consolidate Customers and their related payments/subscriptions once created.
How are you currently accepting these payments, via Payment Links or a different approach?
Well on my website, there is a section where the logged in user can provide the amount select the frequency add the card details and submit. Using Stripe APIs we create a Customer on Stripe, then create product, then create plan of given amount, and then we create a subscription for created customer and created plan.. This is how it is working!
But now I want to stop this process for future customers and I will just create only one customer account for a logged in user and will create multiple subscriptions and charges as per customer's need but the Customer ID will be ONE! But what about the old data that is the issue for me!
๐ stepping in for toby as they need to step away
As noted, there is no consolidation tool here. You essentially will need to decide which Customer you want to use going forward and then you can re-create the Subscriptions that are on another Customer with that Customer.
When recreating the Subs you would use a trial period until the next renewal
Ohh I see! So This is the Only way we can achieve this or is there any other easy solution we have? Because, there are a lot of subscriptions we already created by using this process!
There isn't really another way, no.
You have to manually consolidate these Customers
Ok if I want to update a subscription with price, frequency, and existing Card then how can I do this together?
And also, in the same subscription update, if we need to change the billing cycle for future date as well?
You use https://stripe.com/docs/api/subscriptions/update and you can update all necessary parameters.
Sorry that is a really broad question.
Are you having trouble with something specifically?
Yes, when I am updating the Amount and Frequency it is updating but when I am changing the Card_Id then it is not updating and deducting amount from the old card. Here is the Code:
$subscription = \Stripe\Subscription::retrieve('sub_xxx');
$sub_updated = \Stripe\Subscription::update(
'sub_xxx', [
'cancel_at_period_end' => false,
'default_source' => 'card_xxx',
'proration_behavior' => 'none',
'items' => [
[
'id' => $subscription->items->data[0]->id,
'plan' => $plan->id
],
],
]
);
Do you also have default_payment_method set on the Sub?
I'd recommend not using default_source
That is a legacy parameter
Feel free to provide the Subscription ID and I can look at that as well
No! default_payment_method is not set yet!