[#7203] Refunds with Stripe Sera does not cancel the subscription

4 months 2 weeks ago #305792 by krileon
Refunds work perfectly fine here. The refund API call also happens before the subscription cancellation call, which only happens if the refund API call was successful. You can review all API calls to Stripe by logging into your Stripe Dashboard then navigating to Developers > Logs.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
4 months 2 weeks ago - 4 months 2 weeks ago #305793 by activha
Logs are the same for all refunds in error :
POST body
{
  "charge": "py_1CIupSDq739h3iODAKgOEyF5",
  "metadata": {
    "user_id": "10873",
    "order_id": "5441",
    "invoice": "ACTIVHA-1804-R-511",
    "payment_id": "7026",
    "description": "Duplicata de prélèvement"
  }
}
and response
{
  "error": {
    "message": "You cannot refund a payment for amount=0. Please pass an amount greater than 0.",
    "type": "invalid_request_error"
  }
}

Amont to refund was 45 each time but it does not appear.
Could it be a comma problem between CBsubs and Stripe ?
4 months 2 weeks ago #305797 by krileon
You're not supposed to be supplying commas at all. A period delimiter is used for all purposes except display. So if you wanted to refund 5.10 you'd supply that within CBSubs and it will send to Stripe as 510 (their API always works in cents). A full refund excludes the amount as Stripe is supposed to refund the remaining amount of the charge.

stripe.com/docs/api#create_refund


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
4 months 2 weeks ago #305802 by activha
So you mean that for refunding 45 € we have to input 45.00 and that the input of 45 alone was the source of the error ?

A full refund excludes the amount as Stripe is supposed to refund the remaining amount of the charge.


What do you mean ?
4 months 2 weeks ago #305808 by krileon

So you mean that for refunding 45 € we have to input 45.00 and that the input of 45 alone was the source of the error ?

To refund 45 you'd just supply 45.

What do you mean ?

If the amount being refunded is equal to the amount of the payment then amount is not sent as Stripe will refund the full charge amount, which in your case is whatever the amount is for Stripe charge py_1CIupSDq739h3iODAKgOEyF5. I've tested this just now as working fine.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Moderators: beatnantkrileon
Time to create page: 0.566 seconds
Facebook Twitter Google LinkedIn