5

I've looked over the docs (https://www.braintreepayments.com/docs/ruby/subscriptions/overview) and cannot see if it's possible to change the next billing date of an active subscription.

We want the ability to pause our user's subscriptions without cancelling their subscription. So I'm hoping we can update the user's next billing date by 1, 3, or 6 months at a time.

Dallas Clark
  • 4,064
  • 3
  • 30
  • 36

1 Answers1

8

I work at Braintree. If you have trouble finding anything else in our docs, please feel free to reach out to our support team.

The list of updateable fields on subscriptions is:

  • subscription id
  • price
  • plan
  • payment method token
  • add-on and discount details
  • number of billing cycles
  • merchant account

The next billing date is calculated, and so can't be changed.

Instead, you can add a discount that will reduce the price to zero for a number of months:

result = Braintree::Subscription.update(
  "the_subscription_id",
  :discounts => {
    :add => [
      {
        :inherited_from_id => "discount_id_1",
        :amount => BigDecimal.new("7.00"),
        :number_of_billing_cycles => 3
      }
    ]
  }
)
agf
  • 171,228
  • 44
  • 289
  • 238
  • 1
    Thanks for your quick reply! Providing a discount can be quite trivial for many products with different prices and currencies. Since we may provide discounts for other reasons, this will only introduce confusion should we analyse the records later. The only other method I can see is to use the Braintree Vault to restore a subscription at a given date, but this will require the user's CVV so it's not the best outcome. Do you have any further thoughts? – Dallas Clark Apr 16 '14 at 02:29
  • 1
    @DallasClark You use a CVV to add a card to the vault, not to use a vaulted card for a subscription, so canceling and recreating the subscription should work fine. Since CVVs can't be stored and subscriptions don't have to immediately charge a card, there would be no way to use the CVV in some cases if it was allowed on subscription create. – agf Apr 16 '14 at 04:04
  • Thanks @agf! We will test and come up with a solution. – Dallas Clark Apr 16 '14 at 20:04