Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

C# Web API Examples

Primary Categories

ABN AMRO
AWS Translate
Activix CRM
Adyen
Amazon DynamoDB
Amazon MWS
Amazon Rekognition
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Bitfinex v2 REST
Bluzone
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
ETrade
Egypt ITIDA
Etsy
Facebook
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
MedTunnel
MercadoLibre

Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Okta OAuth/OIDC
OneLogin OIDC
OneNote
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
Trello
Twilio
Twitter
VoiceBase
Vonage
Walmart
Walmart v3
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yousign
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(C#) CardConnect Funding

Demonstrates how to get the merchant funding information.

The funding endpoint provides merchant funding information supported by supplemental transaction and funding adjustment detail. This information is provided by the host payment processing platform (for example, First Data Omaha). ...

See https://developer.cardconnect.com/cardconnect-api?lang=json#funding

Chilkat .NET Downloads

Chilkat .NET Assemblies

Chilkat for .NET Core

Chilkat for Mono

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

Chilkat.Http http = new Chilkat.Http();
bool success;

http.BasicAuth = true;
http.Login = "API_USERNAME";
http.Password = "API_PASSWORD";

string url = "https://<site>.cardconnect.com:<port>/cardconnect/rest/funding?merchid=<merchid>&date=<MMDD>";
string responseStr = http.QuickGetStr(url);
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

// A response status of 200 indicates potential success.  The JSON response body
// must be examined to determine if it was truly successful or an error.
Debug.WriteLine("response status code = " + Convert.ToString(http.LastStatus));

Chilkat.JsonObject jsonResp = new Chilkat.JsonObject();
jsonResp.Load(responseStr);
jsonResp.EmitCompact = false;

Debug.WriteLine("response JSON:");
Debug.WriteLine(jsonResp.Emit());

// A successful response looks like this:

// ------
// See the parsing code below...
// ------

// {
//   "fundingmasterid": 1121753252164835,
//   "fundingdate": "2019-04-22",
//   "adjustments": [
//     {
//       "fundingmasterid": 1121753252164835,
//       "amount": "-44.98",
//       "datechanged": "2019-04-22",
//       "fundingadjustmentid": 1121754400164838,
//       "description": "THE CARDHOLDER DID NOT AUTHORIZE THE CHARGE.",
//       "currency": "USD",
//       "category": "REVERSAL",
//       "type": "CHARGEBACKS/CHARGEBACK REVERSALS",
//       "dateadded": "2019-04-22",
//       "merchid": "MERCHANT_ID"
//     },
//     {
//       "fundingmasterid": 1121753252164835,
//       "amount": "-32.96",
//       "datechanged": "2019-04-22",
//       "fundingadjustmentid": 1121754401164838,
//       "description": "THIRD PARTY ADJUSTMENTS",
//       "currency": "USD",
//       "category": "THIRD PARTY",
//       "type": "THIRD PARTY ADJUSTMENTS",
//       "dateadded": "2019-04-22",
//       "merchid": "MERCHANT_ID"
//     }
//   ],
//   "datechanged": null,
//   "fundings": [
//     {
//       "fundingid": 1121753284164836,
//       "netsales": "129453.03",
//       "totalfunding": "129375.09",
//       "fee": "0",
//       "datechanged": "2019-04-22",
//       "deposittrancode": null,
//       "ddanumber": "3300770540",
//       "thirdparty": "-32.96",
//       "dateadded": "2019-04-22",
//       "fundingmasterid": 1121753252164835,
//       "reversal": "-44.98",
//       "interchangefee": "0",
//       "adjustment": "0",
//       "currency": "USD",
//       "depositachtracenumber": null,
//       "servicecharge": "0",
//       "otheradjustment": "0",
//       "abanumber": "121140399"
//     }
//   ],
//   "merchid": "MERCHANT_ID",
//   "txns": [
//     {
//       "date": "2019-04-19",
//       "amount": "76.75",
//       "downgradereasoncodes": null,
//       "fundingid": 1121753409164836,
//       "cardproc": "FNOR",
//       "sourcetransactionid": null,
//       "type": "SALE",
//       "batchid": 1900942289,
//       "respcode": "00",
//       "interchangeunitfee": "0",
//       "authcode": "PPS209",
//       "plancode": null,
//       "authdate": 20190419194808,
//       "fundingtxnid": 1121753252164835,
//       "cardbrand": "VISA",
//       "currency": "USD",
//       "terminalnumber": null,
//       "cardnumber": "42XXXXXXXXXX4242",
//       "cardtype": "Credit",
//       "retref": "109624271288",
//       "status": "Processed",
//       "interchangepercentfee": "0",
//       "invoicenumber": null
//     },
//     {
//       "date": "2019-04-19",
//       "amount": "9.99",
//       "downgradereasoncodes": null,
//       "fundingid": 1121753410164836,
//       "cardproc": "FNOR",
//       "sourcetransactionid": null,
//       "type": "SALE",
//       "batchid": 1900942289,
//       "respcode": "00",
//       "interchangeunitfee": "0",
//       "authcode": "PPS009",
//       "plancode": null,
//       "authdate": 20190419201502,
//       "fundingtxnid": 1121753252164835,
//       "cardbrand": "VISA",
//       "currency": "USD",
//       "terminalnumber": null,
//       "cardnumber": "47XXXXXXXXXX1443",
//       "cardtype": "Credit",
//       "retref": "109638272902",
//       "status": "Processed",
//       "interchangepercentfee": "0",
//       "invoicenumber": null
//     }
//   ]
// }
// 

// Use this online tool to generate parsing code from sample JSON: 
// Generate Parsing Code from JSON

int fundingmasterid;
string fundingdate;
string datechanged;
string merchid;
int i;
int count_i;
string amount;
int fundingadjustmentid;
string description;
string currency;
string category;
string v_type;
string dateadded;
int fundingid;
string netsales;
string totalfunding;
string fee;
string deposittrancode;
string ddanumber;
string thirdparty;
string reversal;
string interchangefee;
string adjustment;
string depositachtracenumber;
string servicecharge;
string otheradjustment;
string abanumber;
string date;
string downgradereasoncodes;
string cardproc;
string sourcetransactionid;
int batchid;
string respcode;
string interchangeunitfee;
string authcode;
string plancode;
int authdate;
int fundingtxnid;
string cardbrand;
string terminalnumber;
string cardnumber;
string cardtype;
string retref;
string status;
string interchangepercentfee;
string invoicenumber;

fundingmasterid = jsonResp.IntOf("fundingmasterid");
fundingdate = jsonResp.StringOf("fundingdate");
datechanged = jsonResp.StringOf("datechanged");
merchid = jsonResp.StringOf("merchid");
i = 0;
count_i = jsonResp.SizeOfArray("adjustments");
while (i < count_i) {
    jsonResp.I = i;
    fundingmasterid = jsonResp.IntOf("adjustments[i].fundingmasterid");
    amount = jsonResp.StringOf("adjustments[i].amount");
    datechanged = jsonResp.StringOf("adjustments[i].datechanged");
    fundingadjustmentid = jsonResp.IntOf("adjustments[i].fundingadjustmentid");
    description = jsonResp.StringOf("adjustments[i].description");
    currency = jsonResp.StringOf("adjustments[i].currency");
    category = jsonResp.StringOf("adjustments[i].category");
    v_type = jsonResp.StringOf("adjustments[i].type");
    dateadded = jsonResp.StringOf("adjustments[i].dateadded");
    merchid = jsonResp.StringOf("adjustments[i].merchid");
    i = i + 1;
}

i = 0;
count_i = jsonResp.SizeOfArray("fundings");
while (i < count_i) {
    jsonResp.I = i;
    fundingid = jsonResp.IntOf("fundings[i].fundingid");
    netsales = jsonResp.StringOf("fundings[i].netsales");
    totalfunding = jsonResp.StringOf("fundings[i].totalfunding");
    fee = jsonResp.StringOf("fundings[i].fee");
    datechanged = jsonResp.StringOf("fundings[i].datechanged");
    deposittrancode = jsonResp.StringOf("fundings[i].deposittrancode");
    ddanumber = jsonResp.StringOf("fundings[i].ddanumber");
    thirdparty = jsonResp.StringOf("fundings[i].thirdparty");
    dateadded = jsonResp.StringOf("fundings[i].dateadded");
    fundingmasterid = jsonResp.IntOf("fundings[i].fundingmasterid");
    reversal = jsonResp.StringOf("fundings[i].reversal");
    interchangefee = jsonResp.StringOf("fundings[i].interchangefee");
    adjustment = jsonResp.StringOf("fundings[i].adjustment");
    currency = jsonResp.StringOf("fundings[i].currency");
    depositachtracenumber = jsonResp.StringOf("fundings[i].depositachtracenumber");
    servicecharge = jsonResp.StringOf("fundings[i].servicecharge");
    otheradjustment = jsonResp.StringOf("fundings[i].otheradjustment");
    abanumber = jsonResp.StringOf("fundings[i].abanumber");
    i = i + 1;
}

i = 0;
count_i = jsonResp.SizeOfArray("txns");
while (i < count_i) {
    jsonResp.I = i;
    date = jsonResp.StringOf("txns[i].date");
    amount = jsonResp.StringOf("txns[i].amount");
    downgradereasoncodes = jsonResp.StringOf("txns[i].downgradereasoncodes");
    fundingid = jsonResp.IntOf("txns[i].fundingid");
    cardproc = jsonResp.StringOf("txns[i].cardproc");
    sourcetransactionid = jsonResp.StringOf("txns[i].sourcetransactionid");
    v_type = jsonResp.StringOf("txns[i].type");
    batchid = jsonResp.IntOf("txns[i].batchid");
    respcode = jsonResp.StringOf("txns[i].respcode");
    interchangeunitfee = jsonResp.StringOf("txns[i].interchangeunitfee");
    authcode = jsonResp.StringOf("txns[i].authcode");
    plancode = jsonResp.StringOf("txns[i].plancode");
    authdate = jsonResp.IntOf("txns[i].authdate");
    fundingtxnid = jsonResp.IntOf("txns[i].fundingtxnid");
    cardbrand = jsonResp.StringOf("txns[i].cardbrand");
    currency = jsonResp.StringOf("txns[i].currency");
    terminalnumber = jsonResp.StringOf("txns[i].terminalnumber");
    cardnumber = jsonResp.StringOf("txns[i].cardnumber");
    cardtype = jsonResp.StringOf("txns[i].cardtype");
    retref = jsonResp.StringOf("txns[i].retref");
    status = jsonResp.StringOf("txns[i].status");
    interchangepercentfee = jsonResp.StringOf("txns[i].interchangepercentfee");
    invoicenumber = jsonResp.StringOf("txns[i].invoicenumber");
    i = i + 1;
}


 

© 2000-2021 Chilkat Software, Inc. All Rights Reserved.