#zlf_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/1351373044962295848
📝 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.
Hi! After your first successful payment, you can change the card attached to the customer to the Decline after attaching card. The next renewal will fail.
Is there any modified document? Please send it to me
What do you mean by modified document?
I am referring to this card: https://docs.stripe.com/testing?testing-method=card-numbers#:~:text=Decline after attaching
I now know that I need to change the card to "Decline after attaching," but I'm not sure how to do it. Is there any documentation for this change?
Is this the right one
- You can update a customer's default payment method first: https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method
- And then you can update the deafult payment method of the subscription: https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
In the test card doc, you can choose the tan Payment Method under the section Declined payments (https://docs.stripe.com/testing?testing-method=payment-methods#declined-payments)
You will see pm_card_chargeCustomerFail for the Decline after attaching card.
Use that with the API to attach the card to the customer.
I think I found the solution—modifying the payment_method in the subscription's PaymentIntent to the test card's corresponding payment method. Is that correct?
No, that would not be the right way.
I am listing the steps I wrote above again here. Give me a momement.
Let me check the steps you mentioned.
- After the first successful payment for the subscription, you will need to change the card attached to the customer to
pm_card_chargeCustomerFail. - How to do this: https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method
- Then you need to update the default payment method for the subscription: https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.