Section U - Renew API

U1 - Get revenue default settings

POST Method :

To get the renew default settings, send a post request to /api/v1/renew_default_settings with the following data:

Input :

Argument Mandatory Value
userBillingId Yes Numeric < Billing Id of the user >

Sample Output :

[
{"amount":"114.50"}, 
{"oneClickRenew":1,
"renewFromPresentDate":1,
"renewForPaidUsers":1,
"payAsYouGoDays":"2",
"disableRenewWithDays":1}
]

U2 - Renew

POST Method :

To renew a user, send a post request to /api/v1/renew with the following data:

Input :

Argument Mandatory Value
userId Yes Numeric < Id of the user >

Additional Inputs :

Argument Mandatory Value
renewDefaultSettings Yes String < with a keyword “true” >
isForceMakePayment No String < with a keyword “true” >
isRenewPresentDate Yes String < with a keyword “true” or “ false” or “previous”>
isRenewPaidUsers No String < with a keyword “true” >
isRenewWithDays No String < with a keyword “true”>
payAsYouGoDays No Numeric < Number of days to renew>
isChangePlan No String < with a keyword “true”>
planId No Numeric < Plan Id of the plan>
groupId No Numeric < Group Id of the group>
currentInvoiceOnProrataBasis No String < with a keyword “true”>
newInvoiceOnProrataBasis No String < with a keyword “true”>
scheduleRenew No String < with a keyword “true”>
scheduleBasedOn No String < with a keyword “nextBilling” or “customDate”> is mandatory if scheduleRenew is true
scheduleDate No Schedule Date < Date Format yyyy-mm-dd> s mandatory if scheduleBasedOn is customDate
scheduleRenew No String < with a keyword “true”>
renewPeriod No String < “days” or “months” >
renewTimes No Numeric < Number of times to renew>
paymentType No String < with a keyword ( cash, cheque,creditCard, bankTransfer,onlinePayment, debitCard, externalGateway) >
paymentTypeVal1 No Method Variable Cash Collected by Cheque Bank CreditCard Card Number DebitCard Card Number BankTransfer NEFT / IMPS OnlinePayment Notes ExternalPayment Operator
paymentTypeVal2 No
Cheque Cheque Number
CreditCard Card Expiration
DebitCard Card Expiration
ExternalPayment Transaction ID
BankTransfer
TransactionNumber
OnlinePayment TransactionNumber
paymentTypeVal3 No Cheque Cheque Date
comments No text
tagPaymentGateway No String < with a keyword “yes”>
amountPaid No Numeric Mandatory if tagPaymentGateway is yes

Note :

If “tagPaymentGateway” is set as “yes” then “paymentType” should be “externalGateway” , “paymentTypeVal1” should be the payment gateway operator , “paymentTypeVal2” should be the transaction Id, “paymentTypeVal3” should be the payment gateway name and “amountPaid” should be the amount that has been paid.

Sample Output :

{"status":"success", "errorCode" = 200,"message":"Renewal Successful for the 
user username"}