With Braintree's recurring billing, you can charge your customers automatically in monthly increments.
To set this up, you'll need to create a plan in the Control Panel and store your customers in the Vault. Then use
Braintree_Subscription::create() to associate each customer's preferred payment method with the plan.
In addition to the steps listed below, you must create customers with payment methods in the Vault before you can use recurring billing.
Pending subscriptions are subscriptions that have not started yet. For example, if you create a subscription with an explicit first bill date or a specific billing day of month that is in the future, the subscription will start out as Pending.
Active subscriptions will be charged on the next billing date. You can get the dates from the subscription object. Subscriptions in a trial period are Active.
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.
If a retried transaction is unsuccessful, the balance on the past due subscription will continue to increase every billing cycle, and we'll continue to retry the transaction each billing cycle—either indefinitely or until the number of cycles in the subscription is reached. If all retries are unsuccessful, the subscription’s status will remain Past Due until a) the last billing date passes and the status changes to Expired, or b) the subscription is canceled.
Subscriptions are Expired when they have reached the total number of designated billing cycles.
If you cancel the subscription, the status will be Canceled and no further billing will occur.