My Profile_


Recurring Billing Update

After you have set up a Recurring Billing transaction, you can change the details of it as long as it has not yet completed the preset recurring duration (i.e. it hasn’t terminated yet).

The majority of the parameters of the recurring billing update request are optional because they are the values that were specified in the original Recurring Billing transaction that you may now update. You can update any or all of them.

This may be used to update either a credit card or ACH recurring profile.  In the event of an ACH profile, the credit card and expiry date fields do not apply, but the remainder of the optional fields may be updated. 


Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaRecurUpdate
{
	public static void main(String[] args)
	{
		String store_id = "store5";
		String api_token = "yesguy";
		String order_id = "Test155409282";
		String cust_id = "antonio";
		String recur_amount = "1.50";
		String pan = "4242424242424242";
		String expiry_date = "1902";
		//String add_num = "";
		//String total_num = "";
		//String hold = "";
		//String terminate = "";
		String processing_country_code = "CA";
		boolean status_check = false;

		RecurUpdate recurUpdate = new RecurUpdate();
		recurUpdate.setOrderId(order_id);
		recurUpdate.setCustId(cust_id);
		recurUpdate.setRecurAmount(recur_amount);
		recurUpdate.setPan(pan);
		recurUpdate.setExpdate(expiry_date);
		//recurUpdate.setAddNumRecurs(add_num);
		//recurUpdate.setTotalNumRecurs(total_num);
		//recurUpdate.setHold(hold);
		//recurUpdate.setTerminate(terminate);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(recurUpdate);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("RecurUpdateSuccess = " + receipt.getRecurUpdateSuccess());
			System.out.println("NextRecurDate = " + receipt.getNextRecurDate());
			System.out.println("RecurEndDate = " + receipt.getRecurEndDate());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                
USA Code Sample

package USA;

import JavaAPI.*;

public class TestUSARecurUpdate
{
	public static void main(String[] args)
	{
		String store_id = "monusqa002";
		String api_token = "qatoken";
		String order_id = "Test481881053";
		String cust_id = "bob";
		//String recur_amount = "45.00";
		String pan = "5454545454545454";
		String expiry_date = "1701";
		//String p_account_number = "123123123";
		//String presentation_type = "X";
		//String add_num = "";
		//String total_num = "";
		//String hold = "";
		//String terminate = "false";
		String processing_country_code = "US";

		RecurUpdate recurUpdate = new RecurUpdate();
		recurUpdate.setOrderId(order_id);
		recurUpdate.setCustId(cust_id);
		//recurUpdate.setCustId(cust_id);
		//recurUpdate.setRecurAmount(recur_amount);
		recurUpdate.setPan(pan);
		recurUpdate.setExpdate(expiry_date);
		//recurUpdate.setPAccountNumber(p_account_number);
		//recurUpdate.setPresentationType(presentation_type);
		//recurUpdate.setAddNumRecurs(add_num);
		//recurUpdate.setTotalNumRecurs(total_num);
		//recurUpdate.setHold(hold);
		//recurUpdate.setTerminate(terminate);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(recurUpdate);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("RecurUpdateSuccess = " + receipt.getRecurUpdateSuccess());
			System.out.println("NextRecurDate = " + receipt.getNextRecurDate());
			System.out.println("RecurEndDate = " + receipt.getRecurEndDate());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

                

Recurring Billing Update - Transaction Values

RecurUpdate recurUpdate = new RecurUpdate();

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(recurUpdate);

Recurring Billing Update mandatory values

VALUE

TYPE

LIMITS

SET METHOD

DESCRIPTION

Order ID

String

50-character alphanumeric

recurUpdate.setOrderId(order_id);

Order ID of the previously registered recurring billing transaction.

Recurring Billing Update optional values

VALUE

TYPE

LIMITS

SET METHOD

DECRIPTION

Customer ID

String

50-character alphanumeric

recurUpdate.setCustId(cust_id);

This can be used for policy number, membership number, student ID, invoice number. 
This field is searchable from the Moneris Merchant Resource Centre.

Credit card number

String

20-character alphanumeric

recurUpdate.setPan(pan);

Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.

Credit card expiry date

String

4-character numeric

recurUpdate.setExpdate(expiry_date);

Submit in YYMM format.
Note: This is the reverse of the date displayed on the physical card, which is MMYY.

Recurring Amount

String

9-character decimal

recurUpdate.setRecurAmount(recur_amount);

Changes the amount that is billed recurrently. The change takes effect on the next charge. This must contain at least three digits, two of which are penny values, 0.01-999999.99.

Add number of recurs

String

3-character numeric

1-999

recurUpdate.setAddNumRecurs(add_num);

Adds to the given number of recurring transactions to the current (remaining) number.

 

This can be used if a customer decides to extend a membership/subscription. However, because this must be a positive number, it cannot be used to decrease the current number of recurring transactions. For that, use the setTotalNumRecurs method below.

Change number of recurs

String

3-character numeric

1-999

recurUpdate.setTotalNumRecurs(total_num);

Replaces the current (remaining) number of recurring transactions. Note how this differs from the setAddNumRecurs method above.

Hold recurring billing

String

true/false

recurUpdate.setHold(hold);

Temporarily pauses recurring billing.

While a transaction is on hold, it is not billed for the recurring amount. However, the number of remaining recurs continues to be decremented during that time.

Terminate recurring billing

String

true/false

recurUpdate.setTerminate(terminate);

Terminates recurring billing.

Note: After it has been terminated, a recurring transaction cannot be reactivated. A new purchase transaction with recurring billing must be submitted.

 

Recurring Billing Update Response Fields

VALUE

LIMITS

GETMETHOD

DESCRIPTION

Recurring billing

update success

 true/false

receipt.getRecurUpdateSuccess();

Indicates whether the recurring billing transaction has been successfully set up for future billing.

Next recurring billing date

yyyy-mm-dd

receipt.getNextRecurDate();

Indicates when the transaction will be billed again (recur).

Recurring billing end date

yyyy-mm-dd

receipt.getRecurEndDate();

Indicates when the Recurring Billing transaction will end.


Predecessors

Successors
  • NA