#mochihealth
1 messages · Page 1 of 1 (latest)
I don't think there is an automatic setting for that (will double check) but you can definitely cancel and refund through the API.
yea that would be great i see that there is a proration option but is there a way to refund the entire amount through the api
What is the call that you are currently making that is doing this proration? Can you send me the code?
I'm not doing any calls right now im just looking at the api
and it doesnt seem like a way from what i can tell to do a full refund
but im also not super familiar wit h the api so maybe you would know
i see that there is a refund api
but is that fully compatible with the subscriptions api
Gotcha. You are looking at it correctly there, as best as I can tell, the cancel call itself doesn't have an option for a full refund. I think the simplest way to achieve what you want to here would be a cancel call without proration and then a call to create a refund for the full amount
Yes, it is compatible, you can just pass it the charge or payment intent ID from their first payment
The subscription has a latest_invoice, if you get its details it will have a payment_intent that you can use to create this refund
is there a way to cancel a subscription fully and just change thecancel_at_period_end
change
sorry i hit enter to soon
this doesnt make sense lol
can i cancel the subscription right away without waiting for the subscription period to end
Gotcha, I'll wait for the full one
because right now i can just set the cancel_at_period_end field to true but that waits until the billing cycle to end
and if i refund someone i dont want them to have an active subscription
Making that cancel call directly would be the best way to do that. It would cancel the subscription now and change its status accordingly
As in this call: https://stripe.com/docs/api/subscriptions/cancel
cancel_at_period_end is for when you do want them to be active the rest of the cycle
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Overview doc: https://stripe.com/docs/refunds#issuing
API reference: https://stripe.com/docs/api/refunds/create
thank you