Copy payment info
Overview
Copy card-on-file data available in the 2Checkout system from a source subscription to an imported target subscription. 2Checkout uses the existing payment information to charge customers as a part of the recurring billing (renewal) process.
Use the copyPaymentInfo method.
Requirements
The imported target subscription and the source subscription must belong to the same customer. The 2Checkout system checks to make sure that the 2Checkout Customer Reference (an internal identifier) coincides for the customer accounts associated to the target and source subscriptions.
Availability
Please contact 2Checkout directly if you wish to take advantage of this feature.
How does this method work?
- Customer A purchases Subscription A using a VISA credit card and you import Subscription B for the same customer with no data or with an AMEX card.
- When 2Checkout renews Subscription A, it charges Customer A using the VISA, while using the AMEX (if the data was provided) for Subscription B charges.
- When you copy the payment data from Subscription A to Subscription B, the 2Checkout system uses the VISA credit card to renew both subscriptions according to with their respective recurring billing cycles. 2Checkout charges customers during the recurring billing process for the imported target subscription using the payment method they used to purchase the source subscription.
Parameters
Parameters | Type/Description |
---|---|
sessionID |
Required (string) |
|
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes. |
TargetSubscriptionReference |
Required (string) |
The 2Checkout Subscription Reference of the imported target subscription, to which 2Checkout copies the payment on file data associated with the source subscription. |
|
SubscriptionReference |
Required (string) |
|
The 2Checkout Subscription Reference of the source subscription whose attached payment on file data 2Checkout copies to the target subscription. |
Response
Parameter | Type/Description |
---|---|
Boolean |
true or false depending on whether or not the operation succeeded. |
Request
<?php
require ('PATH_TO_AUTH');
var_dump($sessionID);
$TargetSubscription = 'FFAE3C9429';
$SourceSubscription = '9F4154733C';
$jsonRpcRequest = array (
'method' => 'copyPaymentInfo',
'params' => array($sessionID, $TargetSubscription, $SourceSubscription),
'id' => $i++,
'jsonrpc' => '2.0');
var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
?>