#Webdew-susbcriptions
1 messages · Page 1 of 1 (latest)
Hey, what are the 'old customers' in this context and where are they coming from?
Sounds like you just need to create Subscription objects for them in Stripe, no?
the old customer are the customers before implementation of the stripe and they are in my database
yes and set an expiry date also for that subscription
with active state
By expiry date you mean the billing cycle date?
yes
Sure, so you'd just follow the same integration as for your new users, except you'd set the billing cycle date on creation: https://stripe.com/docs/billing/subscriptions/billing-cycle#new-subscriptions
but this required me to create the customer as the customer id is mandatory and to create customer i have to give payment method id and to create payment method i need card details which i dont have
You don't need to pass the payment method when creating the customer
You can do that when you'd confirm the initial Setup Intent/Payment Intent
but when creating subscription with customer without payment method it shows This customer has no attached payment source or default payment method.
Can you share the ID of the API request? req_xxx
using https://api.stripe.com/v1/subscriptions in post method
I need to see the actual API request body
And what's the response?
{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "This customer has no attached payment source or default payment method.",
"type": "invalid_request_error"
}
}
Can you share that Customer ID?
Sorry, looking now. Please be patient as there's other users who also need help
I think this is because of your API version: 2018-11-08
what to do to resolve it ?
You need to pass payment_behaviour: 'allow_incomplete' when creating the Subscription
Yeah you're gonna have to adapt your integration to collect the payment details first
Or update your API version
how t o do that ?
You can either do it on a per API request basis, or overall for the account (which impacts all your existing integrations)
i need it to do only for test account
so that i can create subscriptions
and use the old API keys for the live one
Got it. You'd manage it here: https://dashboard.stripe.com/test/developers
any alternate to this you can tell ?
where i find upgrade option in it ?
or i have to regenerate API keys