My Profile_


Recurring Billing Update

NEW!   We now have our Interactive tool for this section.

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. 

Before sending a Recurring Billing Update transaction that updates the credit card number, you must send a Card Verification request. This requirement does not apply if you are only updating the schedule or amount.

Canada Code Sample

 
require "../../mpgClasses.php";
 
/**************************** Request Variables *******************************/
 
$store_id='store5';
$api_token='yesguy';
 
/************************* Transactional Variables ****************************/
 
$type='recur_update';
$cust_id='my cust id';
$order_id='ord-110515-10:45:21';
$recur_amount='1.00';
$pan='4242424242424242';
$expiry_date='1811';
$add_num='';
$total_num='7';
$hold = 'false';
$terminate = 'false';
 
/*********************** Transactional Associative Array **********************/
 
$txnArray=array('type'=>$type,
                                            'order_id'=>$order_id,
                                            'cust_id'=>$cust_id,
                                            'recur_amount'=>$recur_amount,
                                                                'pan'=>$pan,
                                                                'expdate'=>$expiry_date,
                                                                'add_num_recurs' => $add_num,
                                                                'total_num_recurs' => $total_num,
                                                                'hold' => $hold,
                                                                'terminate' => $terminate
                                               );
 
/******************* Credential on File **********************************/
 
$cof = new CofInfo();
$cof->setIssuerId("168451306048014");
 
/**************************** Transaction Object *****************************/
 
$mpgTxn = new mpgTransaction($txnArray);
$mpgTxn->setCofInfo($cof);
 
/****************************** Request Object *******************************/
 
$mpgRequest = new mpgRequest($mpgTxn);
$mpgRequest->setProcCountryCode("CA"); //"US" for sending transaction to US environment
$mpgRequest->setTestMode(true); //false or comment out this line for production transactions
 
/***************************** HTTPS Post Object *****************************/
 
$mpgHttpPost  =new mpgHttpsPost($store_id,$api_token,$mpgRequest);
 
/******************************* Response ************************************/
 
$mpgResponse=$mpgHttpPost->getMpgResponse();
 
print("\nReceiptId = " . $mpgResponse->getReceiptId());
print("\nResponseCode = " . $mpgResponse->getResponseCode());
print("\nMessage = " . $mpgResponse->getMessage());
print("\nComplete = " . $mpgResponse->getComplete());
print("\nTransDate = " . $mpgResponse->getTransDate());
print("\nTransTime = " . $mpgResponse->getTransTime());
print("\nTimedOut = " . $mpgResponse->getTimedOut());
print("\nRecurUpdateSuccess = " . $mpgResponse->getRecurUpdateSuccess());
print("\nNextRecurDate = " . $mpgResponse->getNextRecurDate());
print("\nRecurEndDate = " . $mpgResponse->getRecurEndDate());
 
?>
 

                

Transaction Values

$txnArray=array('type'=>'recur_update',... );

$mpgTxn = new mpgTransaction($txnArray);

$mpgRequest = new mpgRequest($mpgTxn);

Recurring Billing Update mandatory values

VALUE

TYPE

LIMITS

SET METHOD

DESCRIPTION

Order ID

String

50-character alphanumeric

'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

'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

'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

'expdate'

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

Recurring Amount

String

10-character decimal

'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-9999999.99.

Add number of recurs

String

3-character numeric

1-999

'add_num_recurs'

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

'total_num_recurs'

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

Hold recurring billing

String

true/false

'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

'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.

COF Info Object $mpgTxn->setCofInfo($cof); For Definitions of Request Fields of Credential on File please refer back to Purchase with Credential on File section.

 

Recurring Billing Update Response Fields

VALUE

LIMITS

GETMETHOD

DESCRIPTION

Recurring billing

update success

 true/false

$mpgResponse->getRecurUpdateSuccess();

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

Next recurring billing date

yyyy-mm-dd

$mpgResponse->getNextRecurDate();

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

Recurring billing end date

yyyy-mm-dd

$mpgResponse->getRecurEndDate();

Indicates when the Recurring Billing transaction will end.