Exigo Web Services API v2022.12.19.1

ChargeWalletAccountOnFile

Attempts to debit a wallet account with the amount found on an exiting order, or a new order in a transaction. If the debit request is successful, the order is changed to accepted.

Input Properties

ChargeWalletAccountOnFileRequest
PropertyData TypeNotes
WalletAccountType AccountWalletType
OrderIDInt32Unique numeric identifier for order record.
MemoStringOptional.
MaxAmountDecimalOptional. Only use if you are applying multiple payments.
OrderKeyStringOptional. Unique alpha numeric identifier for order record. Exeption will occur if OrderID & OrderKey are provided.
OtherData1StringOptional.
OtherData2StringOptional.
OtherData3StringOptional.
OtherData4StringOptional.
OtherData5StringOptional.
OtherData6StringOptional.
OtherData7StringOptional.
OtherData8StringOptional.
OtherData9StringOptional.
OtherData10StringOptional.

Output Properties

ChargeWalletAccountResponse
PropertyData TypeNotes
AmountDecimal
AuthorizationCodeString
PaymentIDInt32
MessageString
DisplayMessageString
MerchantTransactionKeyString

Http Request

POST https://yourcompany-api.exigo.com/3.0/payment/charge/walletonfile HTTP/1.1
Content-Type: application/json
Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword)

{ "walletAccountType": null, "memo": "", "orderKey": "1", "otherData1": "1", "otherData2": "1", "otherData3": "1", "otherData4": "1", "otherData5": "1", "otherData6": "1", "otherData7": "1", "otherData8": "1", "otherData9": "1", "otherData10": "1" }

Http Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length

{ "amount": null, "authorizationCode": "", "paymentID": 1, "message": "", "displayMessage": "", "merchantTransactionKey": "", "result": null }

Soap Request

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /3.0/ExigoApi.asmx HTTP/1.1
Host: totallife-api.exigo.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://api.exigo.com/ChargeWalletAccountOnFile"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ApiAuthentication xmlns="http://api.exigo.com/"> <LoginName>string</LoginName> <Password>string</Password> <Company>string</Company> <Identity>string</Identity> <RequestTimeUtc>dateTime</RequestTimeUtc> <Signature>string</Signature> </ApiAuthentication> </soap:Header> <soap:Body> <ChargeWalletAccountOnFileRequest xmlns="http://api.exigo.com/"> <WalletAccountType>Primary or Secondary or Third or Fourth or Fifth</WalletAccountType> <OrderID>int</OrderID> <Memo>string</Memo> <MaxAmount>decimal</MaxAmount> <OrderKey>string</OrderKey> <OtherData1>string</OtherData1> <OtherData2>string</OtherData2> <OtherData3>string</OtherData3> <OtherData4>string</OtherData4> <OtherData5>string</OtherData5> <OtherData6>string</OtherData6> <OtherData7>string</OtherData7> <OtherData8>string</OtherData8> <OtherData9>string</OtherData9> <OtherData10>string</OtherData10> </ChargeWalletAccountOnFileRequest> </soap:Body> </soap:Envelope>

Soap Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ChargeWalletAccountOnFileResult xmlns="http://api.exigo.com/"> <Amount>decimal</Amount> <AuthorizationCode>string</AuthorizationCode> </ChargeWalletAccountOnFileResult> </soap:Body> </soap:Envelope>

C# Rest Client

Install Nuget package Exigo.Api.Client

try

{

    //Create Api Client

    var api = new ExigoApiClient("yourcmpany", "yourlogin", "yourpassword");

 

    //Create Request

    var req = new ChargeWalletAccountOnFileRequest();

 

    req.WalletAccountType = AccountWalletType.Primary;

    req.Memo = "1";

    req.OrderKey = "1";             //Unique alpha numeric identifier for order record. Exeption will occur if OrderID & OrderKey are provided.

    req.OtherData1 = "1";

    req.OtherData2 = "1";

    req.OtherData3 = "1";

    req.OtherData4 = "1";

    req.OtherData5 = "1";

    req.OtherData6 = "1";

    req.OtherData7 = "1";

    req.OtherData8 = "1";

    req.OtherData9 = "1";

    req.OtherData10 = "1";

 

    //Send Request to Server and Get Response

    var res = await api.ChargeWalletAccountOnFileAsync(req);

 

    //Now examine the results:

    Console.WriteLine("Amount: {0}", res.Amount);

    Console.WriteLine("AuthorizationCode: {0}", res.AuthorizationCode);

    Console.WriteLine("PaymentID: {0}", res.PaymentID);

    Console.WriteLine("Message: {0}", res.Message);

    Console.WriteLine("DisplayMessage: {0}", res.DisplayMessage);

    Console.WriteLine("MerchantTransactionKey: {0}", res.MerchantTransactionKey);

}

catch (Exception ex)

{

    Console.WriteLine("Error: " + ex.Message);

}

C# Soap Client

try

{

    //Create Main API Context Object

    ExigoApi api = new ExigoApi();

 

    //Create Authentication Header

    ApiAuthentication auth = new ApiAuthentication();

    auth.LoginName = "yourLoginName";

    auth.Password = "yourPassword";

    auth.Company = "yourCompany";

    api.ApiAuthenticationValue = auth;

 

    //Create Request

    ChargeWalletAccountOnFileRequest req = new ChargeWalletAccountOnFileRequest();

 

    req.WalletAccountType = AccountWalletType.Primary;

    req.Memo = "1";

    req.OrderKey = "1";             //Unique alpha numeric identifier for order record. Exeption will occur if OrderID & OrderKey are provided.

    req.OtherData1 = "1";

    req.OtherData2 = "1";

    req.OtherData3 = "1";

    req.OtherData4 = "1";

    req.OtherData5 = "1";

    req.OtherData6 = "1";

    req.OtherData7 = "1";

    req.OtherData8 = "1";

    req.OtherData9 = "1";

    req.OtherData10 = "1";

 

    //Send Request to Server and Get Response

    ChargeWalletAccountResponse res = api.ChargeWalletAccountOnFile(req);

 

    //Now examine the results:

    Console.WriteLine("Amount: {0}", res.Amount);

    Console.WriteLine("AuthorizationCode: {0}", res.AuthorizationCode);

    Console.WriteLine("PaymentID: {0}", res.PaymentID);

    Console.WriteLine("Message: {0}", res.Message);

    Console.WriteLine("DisplayMessage: {0}", res.DisplayMessage);

    Console.WriteLine("MerchantTransactionKey: {0}", res.MerchantTransactionKey);

}

catch (Exception ex)

{

    Console.WriteLine("Error: " + ex.Message);

}

VB.Net

Try

    'Create Main API Context Object

    Dim api as new ExigoApi()

 

    'Create Authentication Header

    Dim auth as new ApiAuthentication()

    auth.LoginName = "yourLoginName"

    auth.Password = "yourPassword"

    auth.Company = "yourCompany"

    api.ApiAuthenticationValue = auth

 

    'Create Request

    Dim req as new ChargeWalletAccountOnFileRequest()

 

    req.WalletAccountType = AccountWalletType.Primary

    req.Memo = "1"

    req.OrderKey = "1"

    req.OtherData1 = "1"

    req.OtherData2 = "1"

    req.OtherData3 = "1"

    req.OtherData4 = "1"

    req.OtherData5 = "1"

    req.OtherData6 = "1"

    req.OtherData7 = "1"

    req.OtherData8 = "1"

    req.OtherData9 = "1"

    req.OtherData10 = "1"

 

    'Send Request to Server and Get Response

    Dim res As ChargeWalletAccountResponse = api.ChargeWalletAccountOnFile(req)

 

    'Now examine the results:

    Console.WriteLine("Amount: {0}", res.Amount)

    Console.WriteLine("AuthorizationCode: {0}", res.AuthorizationCode)

    Console.WriteLine("PaymentID: {0}", res.PaymentID)

    Console.WriteLine("Message: {0}", res.Message)

    Console.WriteLine("DisplayMessage: {0}", res.DisplayMessage)

    Console.WriteLine("MerchantTransactionKey: {0}", res.MerchantTransactionKey)

Catch ex As Exception

    Console.WriteLine("Error: " & ex.Message)

End Try

PHP

Note: PHP is not officially supported.

<?php

try

{

    //Setup the SoapClient and Authentication

    $api = new SoapClient("http://api.exigo.com/3.0/ExigoApi.asmx?WSDL");

    $ns = "http://api.exigo.com/";

    $auth = array()

    $auth["LoginName"] = new SoapVar("yourLoginName",XSD_STRING,null,null,null,$ns);

    $auth["Password"] = new SoapVar("yourPassword",XSD_STRING,null,null,null,$ns);

    $auth["Company"] = new SoapVar("yourCompany",XSD_STRING,null,null,null,$ns);

    $headerBody = new SoapVar($auth, SOAP_ENC_OBJECT);

    $header = new SoapHeader($ns, 'ApiAuthentication', $headerBody);

    $api->__setSoapHeaders(array($header));

 

    //Create Request

 

    $req->WalletAccountType = 1;

    $req->Memo = "1";

    $req->OrderKey = "1";

    $req->OtherData1 = "1";

    $req->OtherData2 = "1";

    $req->OtherData3 = "1";

    $req->OtherData4 = "1";

    $req->OtherData5 = "1";

    $req->OtherData6 = "1";

    $req->OtherData7 = "1";

    $req->OtherData8 = "1";

    $req->OtherData9 = "1";

    $req->OtherData10 = "1";

 

    //Send Request to Server and Get Response

    $res = $api.ChargeWalletAccountOnFile($req);

 

    //Now examine the results:

}

catch (SoapFault $ex)

{

    echo "Error: ", $ex->getMessage();

}

?>

Java

Note: Java is not officially supported.

try

{

    //Create Main API Context Object

    ExigoApi api = new ExigoApi();

 

    //Create Authentication Header

    ApiAuthentication auth = new ApiAuthentication();

    auth.setLoginName("yourLoginName");

    auth.setPassword("yourPassword");

    auth.setCompany("yourCompany");

    api.setApiAuthenticationValue(auth);

 

    //Create Request

    ChargeWalletAccountOnFileRequest req = new ChargeWalletAccountOnFileRequest();

 

    req.setWalletAccountType(1);

    req.setMemo("1");

    req.setOrderKey("1");

    req.setOtherData1("1");

    req.setOtherData2("1");

    req.setOtherData3("1");

    req.setOtherData4("1");

    req.setOtherData5("1");

    req.setOtherData6("1");

    req.setOtherData7("1");

    req.setOtherData8("1");

    req.setOtherData9("1");

    req.setOtherData10("1");

 

    //Send Request to Server and Get Response

    ChargeWalletAccountResponse res = api.getExigoApiSoap().chargeWalletAccountOnFile(req, auth);

 

    //Now examine the results:

}

catch (Exception ex)

{

    System.out.println("Error: " + ex.getMessage());

}

CSV

This method does not support csv output.