1. Home
  2. Credit Fund Transfer (CFT)

Credit Fund Transfer (CFT)

Credit Fund Transfer (CFT) enables merchants transfer money back into a given cardholder account. Credit Fund Transfer (CFT) is often used for e.g. payouts from a casino account and back to a given cardholder’s account or like scenarios.

A Credit can only happen on a CCSale or Capture transaction. In the case of a Capture transaction, the transactionID of the Capture (not the initial CCAuthorize) must be passed as a parameter.

API Url

Environment Url Method Version
Production https://api.payxpert.com/transaction/{transactionID}/credit POST >= 0200

Credit Fund Transfer Request

Mandatory fields
Field Type Max Length Requirement Description Version
transactionID N 20 M Initial transaction reference to credit
amount N 10 M Number in minor unit, e.g. cents; 100 dollar cent equals to 1 dollar

Credit Fund Transfer Response

Field Type Max Length Requirement Description Version
transactionID N 20 M Transaction reference returned by the system
errorCode D 3 M See Messages and error codes
errorMessage S 100 M See Messages and error codes

PHP Gateway Client

Transaction name : Credit

PHP Methods

Method name Requirement
setReferralInformation M

PHP Example

<?php
$client = new GatewayClient();

$transaction = $client->newTransaction('Credit', 'testMerchant', 'testPassword');
$transaction->setReferralInformation($saleOrCaptureTransactionID, 200);

$response = $transaction->send();

if ('000' === $response->errorCode) {
    $creditTransactionID  = $response->transactionID;
} else {
    echo "Error {$response->errorCode} with message {$response->errorMessage}";
}
?>

Java Gateway Client

Java Methods

Connector method doCreditTransaction
Request class CreditRequest
Response class CreditResponse

Java Examples

PaymentGatewayConnector connector = new PaymentGatewayConnector(API_URL, ORIGINATOR, PASSWORD);

CreditResponse response = null;
CreditRequest request = new CreditRequest();
request.setTransactionId(1234567L);
request.setAmount(2500);

try {
  response = connector.doCreditTransaction(request);
} catch (Exception e) {
  e.printStackTrace();
}

if (response != null) {
  if (TransactionResultCode.TRANSACTION_SUCCESSFULLY.equals(response.getErrorCode()) {
    System.out.println("Success: " + response.getErrorMessage());
  } else {
    System.out.println("Failure: " + response.getErrorMessage());
  }
}

Was this article helpful?