Skip to main content
Vindicia Knowledge Center




The revokeCredit method deducts credit from an Account object. If the deduction results in a negative amount for a certain type of credit, Vindicia Subscribe sets its balance to 0. This method returns the Account object with resultant credit balance.

Specify the amount and type of Credit you wish to revoke from the Account as a Credit object.

To revoke a specific credit grant, specify the VID of the Credit object you wish to revoke. If you do not specify a VID, Vindicia Subscribe will revoke credit in the order in which it would redeem Credits to fulfill an AutoBill Transaction, until the total amount specified is revoked. This process might revoke a partial Credit, a single Credit, or multiple Credits.

For more information on working with credit, see Credit Grants and Gift Cards in the Vindicia Subscribe Programming Guide.


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.

account: the Account object from which you wish to revoke credit. Use the merchantAccountId or VID to identify the object.

credit: a Credit object specifying the amount and type of credit you wish to deduct from the Account. For more information, see the Credit Subobject.

note: an optional memo regarding the credit revocation.


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

account: the Account object from which you revoked credit. This object contains the updated array of Credit objects.


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

Return Code

Return String


One of the following:

  • Account not found.
  • Failed to translate credit error-description.
  • Failed to revoke credit error-description.
  • Failed to save Account after revoking credit.
  • Failed to reload Account after revoking credit error-description.
  • Data validation error: Missing required parameter credit.


// to revoke credit from an account

$acct = new Account();

// account id for an existing customer


$tok = new Token();

// Specify id of an existing token type.
// Assumption here is that you have already created
// a Token object with this id.


$tokAmt = new TokenAmount();

$cr = new Credit();

// Now make the SOAP API call to deduct miles

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

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

// Credit successfully revoked from the account

$updatedAcct = $response['data']->account;
$availableCredits = $updatedAcct->getCredit();
$availableTokens = $availableCredits->getTokenAmounts();

print "Available token credits: \n";
foreach($availableTokens as $tkAmt) {

print "Token type: " . $tkAmt->getMerchantTokenId() . " ";
print "Amount: " . $tkAmt->getAmount() . "\n";



else {

// Error while revoking credit from the account

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


For Users

Learn More
For Users

Vindicia Subscribe Features

Learn More
Vindicia Subscribe Features
Back to Top