jforrest/Chargify-PHP-Client — Issue #13: Updating the next_billing_at date without creating new subscription?
Author: anagio
Created: 2011-12-01 01:43:02+00:00
State: open

I need to update the next_assessment date, I asked Chargify support and they said "The input attribute `next_billing_at` and the "Next Assessment Date" are the same thing. Just update the `next_billing_at` date to end the trial early."

So I tried the code below but this has created a new subscription. Why is a new subscription created when I supply the subscription ID and customer ID and just changing the next_bill_at date?

id = 1108350;
$subscription->customer_id = 1107405;
$subscription->product_handle = "pro";
$epoch = time() + (15*60);
echo date("c", $epoch);
$subscription->next_billing_at = date("c", $epoch);
$result = $subscription->create();
print_r($result);
echo "done"
?>