#meisei81-subscriptions

1 messages · Page 1 of 1 (latest)

celest ember
cinder hedge
#

If I want to refund the difference to the customer's payment method, what should I do?

celest ember
#

Look at the credit in the account balance and/or sum pending invoice items
Use the List Invoices API and pass the subscription id in the subscription parameter to only view Invoices for that subscription. Also expand the associated charge if any. For each invoice:

  • Check if there’s an associated charge
    If so, create a refund for up to the amount of the account balance
  • If the charge amount is smaller than the credit, refund fully and subtract the charge amount from the credit
  • Move to the next invoice in the list until the full credit has been refunded
    Update the customer’s account balance back to 0 via the API and/or delete the pending invoice items.
cinder hedge
#

When upgrade or downgrade subscription, I want to split this to two steps: 1. set the old subscription end 2. create a new subscription. And after the two steps, the amount to pay or amount to refund could be executed immediately?

celest ember
#

when you end the old subscription, i'm assuming that you're enabling prorations as well. If so, then there will be two invoices issued - one for ending the old subscription, and another for the new subscription.

Since ending the old subscription will likely end up with a credit during proration, that will be applied to the customer's balance. When you create a new subscription, any credit in the customer's balance will be applied to the new invoice.

If there is still credit left in the customer balance i.e. invoice for new subscription < credit in customer's balance and you want to refund the remaining credit, then you need to implement the logic i mentioned previously

cinder hedge
#

The refunded amount is in the stripe system, not in the customer's bank card? How could it apply to the bank card immediately?

celest ember
#

yes, the credit that is due to a subscription proration is in Stripe i.e. it is applied to the customer's balance, not the customer's card. There is no way to apply it to the bank card immediately. Unfortunately this isn't a feature we offer right now. You have to implement the logic i mentioned before to refund the credit to the customer's card

wet flax
#

Hi @cinder hedge I'm taking over this thread, let me know if you have any questions

cinder hedge
#

just answer my question above. thanks.

wet flax
#

My colleague Alex has already answered the previous questions, is there a new question?

cinder hedge
#

hello?

wet flax
#

Hi there

cinder hedge
#

could you see my question above?

wet flax
#

I see no new questions, your previous questions are already answered by alex.

cinder hedge
wet flax
#

yes, the credit that is due to a subscription proration is in Stripe i.e. it is applied to the customer's balance, not the customer's card. There is no way to apply it to the bank card immediately. Unfortunately this isn't a feature we offer right now. You have to implement the logic i mentioned before to refund the credit to the customer's card
Did you see this answer?

cinder hedge
#

no

#

So, which api could I use for to implement the logic Alex mentioned?

#

I know if I want to refund the difference when execute downgrade subscription, I should find the invoice which belong to the subscription, and find the latest invoice to refund. Which api to use to refund?

wet flax
cinder hedge
#

ok

cinder hedge
#

Hi, if a customer cancel a subscription, the rest amount would be applied to customer's balance?

wet flax
#

Yes, it will go to the customer's credit balance

cinder hedge
#

When upgrade to more expensive subscription, if pass the create_proration parameter, the extra amount would be paid in next invoice? if pass the always_invoice parameter, it would be paid immediately?

wet flax
#

Yes you are right

cinder hedge
#

ok

#

"When the billing period changes"---- How to change the billing period? Does it mean to change the subscription periods?

wet flax
#

The frequency of invoices, for instance change from a monthly to yearly.

cinder hedge
#

well, it will influence all the subscriptions related to the price, right?

wet flax
#

Nope, it will only affect the updated subscription.

#

You can't change the recurring property of an existing price. You can change the subscription's price property.

cinder hedge
#

you mean change the subscription's price to another so that it can approach the billing period changes target?

wet flax
#

Yes. For instance, changing a price from monthly to yearly will trigger immediate payment.