#brahn-subs-pausecollection

1 messages · Page 1 of 1 (latest)

errant nimbusBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

gritty temple
#
async Task<bool> PauseSub(Subscription sub)
{
    var options = new SubscriptionUpdateOptions
    {
        PauseCollection = new SubscriptionPauseCollectionOptions()
        {
            Behavior = "",
            ResumesAt = DateTime.Now.AddDays(14)
        }
    };
    var service = new SubscriptionService();

    var updatedSub = service.Update(sub.Id, options);

    if (updatedSub != null && updatedSub.Status.ToLower() == "paused")
    {
        return true;
    }
    else
    {
        return false;
    }
}
dreamy void
#

brahn-subs-pausecollection

gritty temple
#

keep_as_draft, mark_uncollectible, or void, which one would automatically collect the payment after ResumesAt?

dreamy void
#

Can you clarify what you mean by "automatically collect payment after it resumes"? Do you want it to collect the payments that weren't collected while the subscriptin was paused? Or do you want the subscription to immediately reset the billing cycle anchor and collect a new payment?

gritty temple
#

collect the payments that weren't collected while the subscription was paused

dreamy void
#

There isn't anything that will automatically collect the payments while the subscription was paused, but what you can do is use keep_as_draft, and once the Subscription is resumed you can list all the draft Invoices and update them as auto_advance: true and that will trigger payment