Skip to main content

SDK - Knowledgebase / LEGACY Products / SDK - Cavallo Technical Support

SDK

Authors list
Important Notice

After October 29, 2019, SalesPad will no longer be supporting CardControl. Additionally, the application will cease to be a PA-DSS validated solution as of this date, and therefore CardControl customers would no longer be PCI compliant. 

Instead, SalesPad Desktop now offers built-in credit card processing via Nodus PayFabric. If you have questions or want more information on our credit card processing services, please contact your sales rep.


Overview

This document gives an overview of how to use both SOAP and REST services of the web API of CardControl. The document begins with an overview of the objects involved, progresses to the functions that operate on those objects, and then gives detailed examples of common usage.

Directory

Objects and their members CustomerCreditCard Customer

InOutDocument CreditCardTransaction SalesDocument SalesLineItem

Functions

Credit Card Functions Customer Functions Transaction Functions

C# SOAP Examples

Initial Server Configuration Example Create Customer Example

Read Customer Example Update Customer Example Delete Customer Example Creating a Customer Credit Card

Getting a Customer’s Credit Card List

Getting the Transactions Made by a Customer

Getting the Transactions Made Between Any Two Dates Processing an Authorization-Only Request

Processing a Capture Request on a Previous Authorization-Only Processing a Void Request on a Previous Transaction Processing a Credit Request

Specific Use Case Examples

XML Serialized Object Examples for the REST API Http Verbs

Valid Rowstate Values for Externally Serialized Objects HTTP Headers

Customer Object Credit Card Object

Authorization-only Request

The Response from the above Authorization-Only Request A Charge Request

The Response from the above Charge Request Charge Request with Sales Document

Objects
CustomerCreditCard

Element

Type

Description

CC_ID

Int32

Unique ID automatically generated when a card is saved.

Customer_Num

String

Unique customer ID.

CC_Number_Masked

String

Masked credit card number (XXXX- XXXX-XXXX-0000).

CC_Type

String

Full name of the credit card type (Mastercard, Visa).

CC_Number_Secure

String

Encrypted Credit Card Number or Token ID.

CC_Expiration_Date

DateTime

Expiration date of the credit card (MM/YY).

Cardholder_Name

String

Name of the card holder.

Cardholder_Street_Address

String

Street address specified in the card billing address.

Cardholder_City

String

City specified in the card billing address.

Cardholder_State

String

State specified in the card billing address.

Cardholder_Zip

String

Zip code specified in the card billing address.

Cardholder_Country

String

Country specified in the card billing address.

Cardholder_Country_Code

String

Country code specified in the card billing address.

Cardholder_Phones

String

Whitespace delimited list of card holder phone numbers, maximum amount three.

CC_Description

String

Description of the credit card.

IsDefault

Boolean

Designates whether or not this is the default card for the associated customer.

Type

Int (Enum)

Designates whether or not this is a credit card or a token.

-Possible values:

  • 0 : CreditCard
  • 1 : Token

TokenStorage

Int32

ID of the processor associated with this token.

Card_Type: Enum

Int

Two character abbreviation of the CC_Type (MC, VI).

-Possible values:

  • 0 : Unknown
  • 1 : NotSet
  • 2 : AM
  • 3 : DI
  • 4 : MC
  • 5 : VI

Example CustomerCreditCard XML

9074

Test1234533

MASTERCARD

2017-01-01 00:00:00

AARON FITZ

42 Wallaby Way

This is a new credit card.

2014-12-19 09:13:45

salespad

2014-12-19 09:13:45

salespad

True

1

1

4

Customer

Element

Type

Description

Customer_Num

String

Unique customer ID.

Customer_Name

String

Customer name.

Don’t_Store_CC

Boolean

Designates whether or not credit cards for this customer will be saved.

Example Customer XML

TEST1234533

Test User

False

InOutDocument

Element

Type

Description

Prev_Transaction_ID

Int32

Unique identifier of the previous transaction associated with the current transaction (Authorization

   

being captured, transaction being voided, etc).

Document_Source

Int (Enum)

Designates the source of this request. Possible values:

  • 0 : Unknown
  • 1 : SOPEntry
  • 2 : CashReceipt
  • 3 : WebApi

Document_Number

String

Document ID.

Document_Type

Int (Enum)

Designates the type of document. Possible values:

  • 0 : Unknown
  • 1 : Quote
  • 2 : Order
  • 3 : Invoice
  • 4 : Return
  • 5 : Backorder
  • 6 : Fulfillment
     

Document_Date

DateTime

Designates the creation date of the document.

Document_Group

String

Unique ID that multiple related documents can belong to. Also known as a Master Number in Microsoft Dynamics GP.

Document_Total

Decimal

The total amount associated with this document.

Customer_Num

String

Unique customer ID associated with this document.

Customer_Name

String

Name of the customer associated with this document.

Currency_ID

String

ID of the currency in use for this document.

Amount

Decimal

Total amount of the transaction for this document.

Upcharge_Percent

Decimal

The percentage to multiply by the amount as an extra charge for this transaction.

Transaction_Type

Int(Enum)

Designates the type of the current transaction.

Possible values: 0 : None

  1. : Authorization
  2. : Charge
  3. : Capture
  4. : Void
  5. : Credit

Processor_ID

Int32

Unique identifier for the target processor that will handle this transaction.

CreditCard_ID

Int32

Unique identifier for a saved credit card. This value should be -1 if the card is new.

CreditCard_Number

String

Credit card number.

CreditCard_Expiration_Date

DateTime

Expiration date of the credit card.

CVV2

String

CVV2 code of the credit card.

Swipe

String

The swipe data generated by using a credit card swiper.

Save_Credit_Card

Boolean

Designates whether or not this credit card should be saved.

Sales_Document

SalesDocument

A sales document containing order information as well as any sales line items.

Example InOutDocument XML

0

3

ORDST2320

2

2018-11-30 00:00:00

64.15000

DONOVAN1

DONOVAN

Z-US$

64.15000

0

2

15

26

1234567890123456

2017-01-01 00:00:00.000

False

2

ORDST2320

STDORD

2015-2-12 00:00:00

Open

CONTRACTS

DONOVAN1

NEED PO

64.15000

2018-11-30 00:00:00

SALESPERSON

NET 30

salespad

DONOVAN

GROUND

0

64.15000

100

SHIPTO CONTACT

SHIPTOADDRESS ONE

SHIPTO CITY

WI

53701-6652

USA

5555555555

BILLTO CONTACT

BILLTO ADDRESS

BILLTO CITY

WI

53701-6652

USA

5555555555

5555555555

PRIMARY

PRIMARY

0

0

0

WAREHOUSE

RETAIL

USASTCITY-6*

Z-US$

0.00

0

64.15000

0

CreditCardTransaction

Element

Type

Description

CC_Transaction_ID

Int32

Unique transaction ID automatically generated when a new transaction is created.

CC_Processor_ID

Int32

Unique identifier for the target processor that will handle this transaction.

CC_Transaction_Type

Int (Enum)

Designates the type of the current transaction.

Possible values:

  • 0 : None
  • 1 : Authorization
  • 2 : Charge
  • 3 : Capture
  • 4 : Void
  • 5 : Credit

CC_Transaction_Time

DateTime

Date that the transaction was processed.

CC_Cardholder_Name

String

Name of the card holder.

CC_Type

String

Full name of the credit card type (Mastercard, Visa).

CC_Number_Masked

String

Masked credit card number (XXXX- XXXX-XXXX-0000).

CC_Expiration_Date

DateTime

Expiration date of the credit card (MM/YY).

CC_Bank_Phone

String

Bank phone number.

CC_ID

Int32

Unique ID automatically generated when a card is saved.

Card_Type

Int (Enum)

Two character abbreviation of the CC_Type (MC, VI).

Possible values:

  • 0 : Unknown
  • 1 : NotSet
  • 2 : AM
  • 3 : DI
  • 4 : MC
  • 5 : VI

CC_Transaction_Status

Int (Enum)

Designates the current status of the transaction.

Possible values:

  • 0 : New
  • 1 : Pending
  • 2 : Success
  • 3 : Fail

Document_XML

String

XML serialized SalesDocument object.

Document_Number

String

Document ID.

Document_Type

Int (Enum)

Designates the type of document. Possible values:

  • 0 : Unknown
  • 1 : Quote
  • 2 : Order
  • 3 : Invoice
   
  • 4 : Return
  • 5 : Backorder
  • 6 : Fulfillment

Document_Date

DateTime

Designates the creation date of the document.

Document_Group

String

Unique ID that multiple related documents can belong to. Also known as a Master Number in Microsoft Dynamics GP and Master_Num for the SalesDocument object.

Customer_Num

String

Unique customer ID associated with this document.

Customer_Name

String

Name of the customer associated with this document.

PO_Num

String

Designates the purchase order number associated with this document.

Comments

String

Miscellaneous comments for this document.

Document_Total

Decimal

The total amount associated with this document.

Currency_ID

String

ID of the currency in use for this document.

Freight

Decimal

This document’s freight amount.

Tax

Decimal

This document’s tax amount.

Discount

Decimal

This document’s discount amount.

Amount

Decimal

The total amount for the current transaction.

Auth_Code

String

Unique identifier for the current transaction. If this transaction is new, this field is automatically generated by the processor when the transaction is completed.

Auth_Code2

String

Secondary identifier for the current transaction set by the payment processor.

Processor_Results

String

Processor response details.

Original_Transaction_Info

String

XML serialized CreditCardTransaction for the previous associated transaction.

Document_Source

Int (Enum)

Designates the source of this request. Possible values:

  • 0 : Unknown
  • 1 : SOPEntry
  • 2 : CashReceipt
  • 3 : WebApi

Tax_Exempt_1

String

Determines whether or not tax is included with the transaction amount.

Tax_Exempt_2

String

Determines whether or not tax is included with the transaction amount.

Shipping_Method

String

The shipping method the associated products.

ISOCurrencyID

String

The ISO standardized currency ID for the current transaction amounts.

Ship_To_Contact

String

The name of the customer associated with the shipping address.

Ship_To_Address_1

String

The first line of the shipping address.

Ship_To_Address_2

String

The second line of the shipping address.

Ship_To_Address_3

String

The third line of the shipping address.

Ship_To_City

String

The city specified in the shipping address.

Ship_To_State

String

The state specified in the shipping address.

Ship_To_Zip

String

The zip code specified in the shipping address.

Ship_To_Country

String

The country specified in the shipping address.

Ship_To_Country_Code

String

The country code specified in the shipping address.

Ship_To_Phone

String

The phone number specified in the shipping address.

Ship_To_Fax

String

The fax number specified in the shipping address.

Ship_To_Email

String

The email address specified in the shipping address.

Ship_To_Addr_Code

String

The address code specified in the shipping address.

Bill_To_Contact

String

The name of the customer associated with the billing address.

Bill_To_Address_1

String

The first line of the billing address.

BillTo_Address_2

String

The second line of the billing address.

Bill_To_Address_3

String

The third line of the billing address.

Bill_To_City

String

The city specified in the billing address.

Bill_To_State

String

The state specified in the billing address.

Bill_To_Zip

String

The zip code specified in the billing address.

Bill_To_Country

String

The country specified in the billing address.

Bill_To_Country_Code

String

The country code specified in the billing address.

Bill_To_Phone

String

The phone number specified in the billing address.

Bill_To_Fax

String

The fax number specified in the billing address.

Bill_To_Email

String

The email address specified in the billing address.

Bill_To_Addr_Code

String

The address code specified in the billing address.

Example CreditCardTransaction XML

13628

1

TestProcessor

1

2014-12-19 12:41:10

MASTERCARD

XXXX-XXXX-XXXX-5100

2019-01-01 00:00:00

2

ORD012020

2

1900-01-01 00:00:00

AA10202

John Smith

0

0

0

0

20.00

2225851807

Authorization transaction successful: This transaction has been approved. | AVS Response: Address (Street) and five digit ZIP match | Security Code Response: | Cardholder Authentication Verification Response: CAVV passed validation

2014-12-19 12:41:10

Helpful Unhelpful