Braintree failed subscription payments retry when updating payment method proration turned on - braintree

Can someone please help.
Braintree documentation states:
If a payment for a subscription fails, the subscription status will change to Past Due. You can manually retry the charge, or you can set up logic in the Control Panel to automatically retry a declined or failed charge at specific intervals. Additionally, a past due subscription will be automatically retried if the payment method associated with the subscription is updated and you either have proration enabled or are manually passing the prorate charge option. If the retried transaction is successful and the subscription has not passed its last billing date, the status will change to Active.
My question is:
If a payment for a subscription fails, and then the payment method for the subscription is updated with proration turned on a few days later. Will braintree retry the original charge again, or will braintree use proration to charge the customer?
For example:
Customer has a $50 monthly subscription that bills on the first of each month.
Payment fails on 1st September. We email customer and ask them to update payment method.
Customer updates payment method on 3rd September.
Are they charged...
Monthly subscription price = $50
Number of days left in the billing cycle = 27
Total number of days in the billing cycle = 30
($50) x (27 / 30) = $45
Or
Are they charged $50
I would really appreciate any help.

Related

Different orders.refund with purchases.subscriptions.refund for subscription refund on GooglePlay IAP

Per doc purchases.subscriptions.refund
Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur.
and doc orders.refund
orders.refund a user's subscription or in-app purchase order
Both of them could be used to do subscription refund on GooglePlay IAP. What the different between them?

Braintree - proration upon subscription cancellation

I have a yearly recurring subscription set up on Braintree. I am trying to cater for a scenario where the user is able to have their subscription cancelled by an admin part way into the yearly cycle.
I am aware of the discounts feature but am unsure how I would apply it in this case or even whether its possible.
Is there a way in Braintree to prorate the amount for the rest of the cycle and credit it back to the user? I would not be doing any of this directly in Braintree but rather through the API via my application that uses Braintree for payments.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support#braintreepayments.com.
You can cancel an annual subscription mid-cycle by using the API call to cancel a subscription. Here's a Ruby example, but the Braintree developer docs show examples in all supported SDKs.
result = Braintree::Subscription.cancel("the_subscription_id")
A proration would only apply if a change is made to the subscription price in the middle of a billing cycle. In the event of a cancellation, Braintree won't automatically issue a partial refund; you would have to process the refund yourself. Here is the API call for a partial refund:
result = Braintree::Transaction.refund("transaction_id", "amount")
Also, keep in mind that a cancelled annual subscription will not renew the next year. The only way to "reactivate" the subscription is to create a new one.

Laravel Cashier Stripe Trial creates new subscriptions, allows exploit

I am using Laravel Cashier to add stripe payments (subscriptions) for the premium version of my web app. Users are offered a 5-day free trial (card in advance).
Now what happens is, I create a subscription using:
$user->newSubscription('premium','monthly')->trialDays(5)->create($stripeToken,['email' => $user->email], "")
Works really well, but let's say the user cancels his subscription within the trial period.. He will be on the 'grace' period, let's say for 4 more days..
When these days are passed, user will lose account benefits, as the trial will expire and subscription is cancelled.
But, after that, if the user wants to subscribe again, since $subscription->resume() is only available during the grace period, I would have to create a subscription using $user->newSubscription, generating a new subscription on the table and a new trial period.. allowing them to cancel again, wait 5 days, create another one and repeat this getting free trial days forever..
Is there a way to "resume" an existing subscription when it is cancelled and grace period is over?

How can i receive Ipn responce for each recurring billing cycle wheather payment is received

i have created an Paypal recurring profile with the required parameter successfully
now I want to renew user subscription with IPN notification on each billing cycle..while the payment for the cycle is made. is that possible?
what i have to do to receive the IPN in each billing cycle
after i create recurring profile what steps should i follow. as currently i am getting IPN for creating Paypal recurring profile but not for the payment in each cycle ...
please check my previous question to get the profile creation details
paypal parameater to create recurring profile is giving error can one please help me out

Recurring Payments - Trial without card

We're developing a system whereby the user will be sign-up and have a 3 month trial without entering card details. Once the trial period is up they get sent an e-mail asking them to come back and register card details in order to setup a recurring payment in order to continue accessing the site.
Is it possible to configure recurring payments with Braintree such that we don't provide a card for the trial period and then configure one upon notification that it has expired?
Thanks!
I work at Braintree. If you want more information than you can easily get on Stack Overflow, please reach out to our support team.
Braintree subscriptions require a credit card to be created. That way, the transition from trial period to billing doesn't require any action by the customer or merchant. Since our core service is billing credit cards, that's what subscriptions are designed to do.
In your case, it sounds like you can create a subscription in your application, and only link it to a Braintree subscription if / when credit card details are entered. You'll need to handle tracking the three month time limit yourself.

Resources