Hello,
I would like to change the "next_billing_date" on subscription when the customer restart the subscription from suspended state.
The situation is (example):
Customer has monthly subscription, she pay every 2nd of the month and we deliver the product.
Customer Suspend the subscription....
When the customer resume the subscription she can set up a new delivery date. So we would like to change the "next_billing_date" in the agreement details to the (delivery date) - 1 day.
What I tried:
Agreement agreement = Agreement.Get(apiContext, formulate.SubscriptionId); agreement.agreement_details.next_billing_date = string.Format("{0}Z", formulate.NextDeliveryDate.Value.AddHours(-16).ToString("s")); PatchRequest pr = new PatchRequest() { new Patch() { op = "replace", path = "/", value = new Plan() { description = "Restarting subscription (" + formulate.SubscriptionId.ToString() + ") - " + DateTime.Now.ToString() } } }; agreement.Update(apiContext, pr); agreement.ReActivate(apiContext, asd);
The PatchRequest is just dummy, because need a PatchRequest for the agreement.Update method.
I thought I can update the agreement this way, but unfortunately the "Next Payment Date" didn't change on the subscription.
Is anybody can help me what I should do?
Many thanks
Zoltan
... View more