#aayush
1 messages ยท Page 1 of 1 (latest)
You could use one of our declined payments test cards: https://stripe.com/docs/testing#declined-payments. That in combination with test clocks should get you set up: https://stripe.com/docs/billing/testing/test-clocks.
i have that setup just wanna know for a same customer how can i test it
for ex if his attempty is succesfull then for next billing date how can i test a failed case for that user?
You could use a test card for success for the first payment, then change the subscription's default payment method to the 4000000000000341 test card, which declines for payments after a successful attachment to a customer
how can i change subscription card for this customer?
How do you set the default pm currently?
Should just be this: https://stripe.com/docs/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.
my default payment right now is through checkout subscription page
Yeah you should be able to call the api I linked to override
sure thanks!
No problem
how to set this up?
i see it comes in the response when sub is created
Hi ๐
I'm stepping in as @west pike needs to go. I see you are trying to update the default payment method and my colleague has provided you with the documentation you need. Is there anything unclear?
yes i just want to know about updating my subscription to test a payment fail scenario
all in all i want to change card details so that i can provide wrong card and attempt to test my scneanrio
Okay, so my colleague pointed out you use the Update Subscription API with the code examples in the API reference doc we shared
yes
You would upate the payment method to one of our test decline cards here: https://stripe.com/docs/testing?testing-method=payment-methods#declined-payments
so to change card details does it take card details as params ?
just to test the endpoint api
No, I would recommend you use the Payment Methods like pm_card_visa_chargeDeclined