Showing results for 
Search instead for 
Did you mean: 

Both Trial Amount and Trial Occurrences are required



Anyone can help me please to resolved my problem now.


The error details please see below:

API Error Code: E00026
Error Code Text: Both trialAmount and trialOccurrences are required.
Description: If either a trial amount or number of trial occurrences is specified then values for both must be submitted.


I give the value of  both field, but I still having that error. Im very frustrated this error an like paypal is very easy to configure the trial period.


Example of:


amount = 10 every monthly

TrialInterval.length = 21 days

trialAmount = 7 should be the first payment of the current months subcribe, divided by total of days in month and 10 for every month.

trialOccurrences = 21


Please see my code below:


MerchantAuthenticationType authentication = PopulateMerchantAuthentication();                                  

                PaymentScheduleTypeInterval PaymentInterval = new PaymentScheduleTypeInterval();
                PaymentInterval.length = b.BillingFrequency;
                PaymentInterval.unit = ARBSubscriptionUnitEnum.months;

                PaymentScheduleType PaymentSchedule = new PaymentScheduleType();
                PaymentSchedule.interval = PaymentInterval;
                PaymentSchedule.startDate = b.DateStartedRecurring;
                PaymentSchedule.startDateSpecified = true;
                PaymentSchedule.totalOccurrences = Convert.ToSByte(b.BillingFrequency);
                PaymentSchedule.totalOccurrencesSpecified = true;                                                    

                CreditCardType creditCard = new CreditCardType();                  
                creditCard.cardNumber = b.CreditCardNumber;
                creditCard.expirationDate = b.creditCardExpirYear + "-" + b.CreditCardExpirMonth;  // required format for API is YYYY-MM
                creditCard.cardCode = b.CVV2;

                PaymentType PaymentType = new PaymentType();
                PaymentType.Item = creditCard;

                ARBSubscriptionType sub = new ARBSubscriptionType();

                PaymentScheduleTypeInterval TrialInterval = new PaymentScheduleTypeInterval();
                TrialInterval.length = Convert.ToSByte(b.TrialLength);
                TrialInterval.unit = ARBSubscriptionUnitEnum.days;

                // Free 1-month trial
                PaymentScheduleType Ps = new PaymentScheduleType();

                Ps.interval = TrialInterval;
                Ps.trialOccurrencesSpecified = true;
                Ps.trialOccurrences =  b.TrialBillingFrequency;
                sub.amountSpecified = true;
                sub.amount = b.RecurrenceBillingAmount;
                sub.trialAmountSpecified = true;
                sub.trialAmount = b.trialAmount;
                //Billing Info
       = b.SubscriptionDescription;                 
                sub.paymentSchedule = PaymentSchedule;                
                sub.payment = PaymentType;                           

                sub.billTo = new NameAndAddressType();
       = b.BusinessName;
                sub.billTo.firstName = b.PayerFirstName;
                sub.billTo.lastName = b.PayerLastName;
                sub.billTo.address = b.ShippingAddress;
       = b.ShippingCity;
       = b.ShippingCountry;
                sub.billTo.state = b.ShippingState;
       = b.ShippingZipCode;

                sub.customer = new CustomerType();
       = b.EmailAddress;
                sub.customer.phoneNumber = b.PhoneNumber;

                ARBCreateSubscriptionResponseType response;
                response = _webservice.ARBCreateSubscription( authentication, sub );

                if( response.resultCode == MessageTypeEnum.Ok )
                    bResult = true;
                    bResult = false;



I need you any feedback ASAP thanks.





The trial occurrences object PaymentScheduleType Ps is not getting use. 

Shouldn't it use the PaymentScheduleTypeInterval PaymentInterval and PaymentScheduleType PaymentSchedule for the trial?