#samip_api
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/1389443617436860418
📝 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.
- samip_best-practices, 6 days ago, 14 messages
Hi! Looking into your query!
Can I check why are you expecting the Invoice to be paid? Do you expect it to be paid with the existing payment method of the customer?
Yes I did expect it to be paid with the existing payment method
What I am trying to actually do is migrate from one stripe account to another account :
- I copied the customer data from one account to another account
- I created the product and prices on the new account using the API
- I am now getting the old subscription data from the old account -> using it to create a new subscription in the new account
I succeed in doing everything but the invoice stays open.
You are using payment_behavior: default_incomplete. This means: Use default_incomplete to create Subscriptions with status=incomplete when the first invoice requires payment, otherwise start as active.
https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_behavior
I want to actually use the old subscription status , i.e if the old subscription is active then I want it to be active in the new account.
Everytime I try to do that , it tells me there is no default payment method, I've even tried updating the customer to set the default payment method to no avail.
Can you give me an example of a subscription where you tried updating the customer to set the default payment method to no avail?
cus_Sb4zz1TZ2i01Tr
req_v1wdODFaGTEgd8
https://docs.stripe.com/api/customers/update#update_customer-default_source
I am extracting the customer record from the old account then calling the update customer endpoint and updating the default_source using customer.invoice_settings.default_payment_method where customer referrs to the old customer record then I use the value and pass it as the default_source parameters.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
⛔️ Stripe developers have stepped away for a short while
Please leave your questions here, and we’ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.
hi there 👋 give me awhile to catch up
@celest yacht the customer (cus_Sb4zz1TZ2i01Tr) existing payment method isn't set as default. Your subscription (sub_1RfuN1R5szRO3W0nXkRDD9a3) is configured to charge default payment method so the customer object needs to have a default payment method
How do I update the customer to set a default payment method ?
I have tried getting it from the old customer record and trying to set in the new one.
So pm_1RftiTR5szRO3W0nbv6rCA6E needs to be set under the customer's invoice_settings.default_payment_method [0]
[0] https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method