#alok-subscription
1 messages · Page 1 of 1 (latest)
I'm planning to use this API: https://stripe.com/docs/api/subscriptions/cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And invoice_now is listed as an optional parameter:
How do I pass it into the request?
pass invoice_now: true with the request
Thanks! It didn't seem to work when tried it. Will do so again.
Still not working .. here is my call:
Stripe::Subscription.delete({
id: stripe_subscription_id,
invoice_now: true
})
Whereas this worked:
Stripe::Subscription.delete(stripe_subscription_id)
I'm using rails and have the gem enabled
Hi @narrow thistle! Stepping in here from @solar crypt as he needs to step away. You want
stripe_subscription_id, {
invoice_now: true
})```
Thanks! Trying it now.
Worked. So as I understand it, the invoice will be generated and the bill will be processed immediately on the deletion of the subscription right?
Yep. I recommend testing it out to see exactly how it works!