AuthTransaction
This action is used to generate sale transactions and preauthorizations. This also contains the instructions to originate a transaction and set it to recur automatically. The example below displays all fields that could potentially be used for this action – including the optional fields which are specified.
Optional Fields
- AuthCode
- Use only for a FORCE transaction. Vaild entries can be an alphanumeric value (6-7 Digits).
- Preauth
- Use only to generate a preauthorization. A corresponding postauth transaction would be necessary to actually complete a charge for a preauth.
NOTE: <Preauth/> is an empty-element tag. There is no corresponding tag. It is the only singular/empty-element tag in the request.
- CustId
- Can be used for unique or custom identifiers generated by your system.
- ShippingAddress
- CardAccount elements
- Use only for credit card transactions. Do not pass if passing CheckAccount elements.
- CheckAccount elements
- Use only for check/eft transactions. Do not pass if passing CardAccount elements.
- RecurringData elements
- Use only when initiating a transaction to be set for recurring billings.
- TransactionControl elements
- VendorData elements
Example
<?xml version="1.0"?>
<GatewayInterface>
<APICredentials>
<Username>username</Username>
<PayloadSignature>EXAMPLESIGNATURE</PayloadSignature>
<TargetGateway>12345</TargetGateway>
</APICredentials>
<AuthTransaction>
<!-- Optional. Supplying AuthCode results in Force transaction -->
<AuthCode>1234567</AuthCode>
<!-- Optional. Supplying Preauth results in Pre-Auth transaction -->
<Preauth/>
<CustomerData>
<Email>kevin@demoemail.com</Email>
<!-- Optional Custom ID-->
<CustId>ABC12345</CustId>
<BillingAddress>
<Address1>test</Address1>
<Address2>test2</Address2>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<City>Bountiful</City>
<State>UT</State>
<Zip>84032</Zip>
<Country>USA</Country>
<Phone>801-555-1212</Phone>
</BillingAddress>
<!-- Optional ShippingAddress -->
<ShippingAddress>
<Address1>test</Address1>
<Address2>test2</Address2>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<City>Bountiful</City>
<State>UT</State>
<Zip>84032</Zip>
<Country>USA</Country>
<Phone>801-555-1212</Phone>
</ShippingAddress>
</CustomerData>
<!-- Can either supply OrderItems or Total and Description -->
<OrderItems>
<Item>
<Description>test</Description>
<Cost>10.00</Cost>
<Qty>1</Qty>
</Item>
</OrderItems>
<Total>10.00</Total>
<Description>desc</Description>
<AccountInfo>
<!-- Can supply either CardAccount or CheckAccount -->
<CardAccount>
<!-- Supply AccountNumber, ExpirationMonth and ExpirationYear or TrackData -->
<AccountNumber>5454545454545454</AccountNumber>
<ExpirationMonth>01</ExpirationMonth>
<ExpirationYear>2000</ExpirationYear>
<!-- Optional -->
<CVVNumber>123</CVVNumber>
<!-- Track Data if running swipe transaction -->
<TrackData>TRACK DATA</TrackData>
<!-- Supply Ksn, Pin along with TrackData for Debit transactions -->
<Ksn>12345</Ksn>
<Pin>1234</Pin>
</CardAccount>
<CheckAccount>
<AccountNumber>123456</AccountNumber>
<ABA>124000054</ABA>
<!-- Account Source Identifier if required by NACHA processor -->
<AccountSource>checking</AccountSource>
<!-- Account Type Identifier if required by EFT processor -->
<AccountType>personal</AccountType>
<!-- Standard Entry Class Code if required by processor -->
<SecCode>CODE</SecCode>
</CheckAccount>
</AccountInfo>
<!-- Optional Recurring Commands -->
<RecurringData>
<Recipe>text</Recipe>
<RemReps>1</RemReps>
<!-- Optional -- Can either supply OrderItems or
Total and Description to have recurring transactions run for a separate amount
also called Split Recurring amounts. -->
<OrderItems>
<Item>
<Description>test</Description>
<Cost>10.00</Cost>
<Qty>1</Qty>
</Item>
</OrderItems>
<Total>10.00</Total>
<Description>desc</Description>
</RecurringData>
<!-- Optional Transaction Controls-->
<TransactionControl>
<SendCustomerEmail>TRUE</SendCustomerEmail> <!-- TRUE/FALSE -->
<SendMerchantEmail>TRUE</SendMerchantEmail> <!-- TRUE/FALSE -->
<TestMode>TRUE</TestMode> <!-- TRUE/FALSE -->
<EmailText>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
<EmailTextItem>test1</EmailTextItem>
</EmailText>
</TransactionControl>
<!-- Optional. This information will be saved on our
servers and is available in the XML transaction report. This is
useful if you want to save your own transaction meta-data with a
transaction. -->
<VendorData>
<Element>
<Name>repId</Name>
<Value>1234567</Value>
</Element>
</VendorData>
</AuthTransaction>
</GatewayInterface> |
For additional information, please view the XML API Connection documentation HERE.