I am using authorize.net for monthly subscription plan with trial period using customer profile API. Reference: https://developer.authorize.net/api/reference/#recurring-billing-create-a-subscription-from-customer-profile I want to set interval for trial period of subscription. In api, I could not get related to interval of trial period. Scenario: If I subscribe on date 1-1-2019 then user will get 1st trial period of 7 days. So, trial end date must be of 8-1-2019 with 0 amount. Then actual subscription end date must be of 8/2/2019(for 1month after trial period)and 100 amount for subscription.
$subscription = new AnetAPI\ARBSubscriptionType();
$subscription->setName("Sample Subscription");
$interval = new AnetAPI\PaymentScheduleType\IntervalAType();
$interval->setLength('30');
$interval->setUnit("days");
$paymentSchedule = new AnetAPI\PaymentScheduleType();
$paymentSchedule->setInterval($interval);
$paymentSchedule->setStartDate(new DateTime('2019-01-01'));
$paymentSchedule->setTotalOccurrences("9999");
$paymentSchedule->setTrialOccurrences("1");
$subscription->setPaymentSchedule($paymentSchedule);
$subscription->setAmount(100);
$subscription->setTrialAmount("0.00");
Using what parameter I can pass trial interval in authorize.net? Please help me out in this. Thanks in advance.