Skip to main content
Vindicia Knowledge Center




The transferCredit method transfers credits from a parent Account to a child Account, or from one child in a family to another.


srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

fromAccount: the Account from which credits will be transferred.

toAccount: the child Account to which credits will be transferred.

credit: the credits to be transferred.


return: an object of type Return that indicates the success or failure of the call.


In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String


One of the following:

  • No match found for toAccount.
  • No match found for fromAccount.


Unable to transfer account.


// to transfer credits from a parent to a child account
// Create a new Account object for parent

$parent = new Account();

// Provide basic account information

$parent->setName('Somebody Q. Customer'); // Customer name
$parent->setMerchantAccountId('IN9430-8421'); // Unique customer id

// Create a new Account object for child

$child = new Account();
$child->setName('Somebody Q. Customer Jr.'); // Customer name
$child->setMerchantAccountId('IN9430-8421JR'); // Unique customer id

// Establish a parent->child relationship between $parent and $child

$childrenAdded = $anyOldAccountYouveGot->addChildren

($parent, array($child))

//Grant credit to the parent

$curAmt = new CurrencyAmount ;

$cr = new Credit();

// Now make the SOAP API call to grant credit to the acct

$response = $acct->grantCredit($cr);

if ($response['returnCode'] == 200) {

// Credit successfully granted to the account

$updatedAcct = $response->['account'];


else {

// Error while granting credit to the account

print $response['returnString'] . "\n";


//Define credits to be transferred from parent to child

$curTranAmt = new CurrencyAmount ;

$crTran = new Credit();


//Transfer specified credits from parent to child account

$response = $parent->transferCredit($child, $crTran);
if ($response['returnCode'] == 200) {

// Credit successfully granted to the account


else {

// Error while transferring credit between accounts

print $response['returnString'] . "\n";


For Users

Learn More
For Users

Vindicia Subscribe Features

Learn More
Vindicia Subscribe Features
Back to Top