API Reference

API Endpoints & Authentication

All requests to the Authorize.Net API are sent via the HTTP POST method to one of our API endpoint URLs.

HTTP Request Method: POST


Sandbox API Endpoint: https://apitest.authorize.net/xml/v1/request.api

Production API Endpoint: https://api.authorize.net/xml/v1/request.api


XML Content-Type: text/xml

JSON Content-Type: application/json


API Schema (XSD): https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd


All calls to the Authorize.Net API require merchant authentication. Sign up for a sandbox account to quickly get started.

A Note Regarding JSON Support

The Authorize.Net API, which is not based on REST, offers JSON support through a translation of JSON elements to XML elements. While JSON does not typically require a set order to the elements in an object, XML requires strict ordering. Developers using the Authorize.Net API should force the ordering of elements to match this API Reference.

We are actively developing REST APIs with native JSON support. If you are interested in being a beta tester of our REST APIs, please email developer-feedback@authorize.net so we can contact you as the APIs become available.

Alternately, consider using the Authorize.Net SDKs for a seamless integration.

Test Your Authentication Credentials

Use this method to test that your authentication credentials are valid and that they are being received successfully by the Authorize.Net API.

authenticateTestRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.
name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
20-character maximum.
transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
16-character maximum.
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
Up to 20 characters.

authenticateTestResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
Up to 20 characters.
messages This element contains a resultCode and one or more message elements.

resultCode Ok or Error.

States whether the request was handled successfully, or ended with an error.
message Contains details about the result.

code The code number for the result.

Up to six characters. The first character is either an I for informational responses, or E for error responses. The remaining characters are numerical and indicate the type of informational or error response. For example, I00001 or E00001. For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
text Text explanation of the code for the result.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Payment Transactions

The createTransactionRequest function enables you to submit a wide variety of transaction requests, depending on how you structure it. For example, differences in the transactionType field or the payment field can create different types of transactions.

For more information about the different types of transactions, see the Payment Transactions page.

Charge a Credit Card

Use this method to authorize and capture a credit card payment.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authCaptureTransaction to authorize and automatically capture the transaction.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment Contains payment information.

trackData



Applies to Card Present transactions only.

Contains track data read from the customer's card.

Track data contains the full card number and expiration date by default. If you use the trackData element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
track1 Conditional.

Applies to Card Present transactions only.

Track data includes the full card number and expiration date by default. If you send the track1 element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
String, 76 characters.

Do not include the start sentinel (percent sign), end sentinel (question mark), or Longitudinal Redundancy Check.

track2 Conditional.

Applies to Card Present transactions only.

Track data includes the full card number and expiration date by default. If you use the track2 element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
String, 37 characters.

Do not include the start sentinel (semicolon), end sentinel (question mark), or Longitudinal Redundancy Check.

creditCard Conditional.

Applies to Card Not Present transactions only.

Contains human-readable information from the customer's card.

cardNumber Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card number.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
Numeric string, 13-16 digits.

expirationDate Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card expiration date.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
String, 7 characters.

Use XML gMonthYear (YYYY-MM) formatting.

cardCode Conditional.

Applies to Card Not Present transactions only.

The customer’s card code.

The three- or four-digit number on the back of a credit card (on the front for American Express).

This field is required if the merchant would like to use the Card Code Verification (CCV) security feature.

Cardholder information must be stored securely and in accordance with the Payment Card Industry (PCI) Data Security Standard.

For more information about PCI, please refer to the Standards, Compliance and Security developer training video at https://developer.authorize.net/training.
Numeric string, 3-4 digits.

profile The following field enables you to create a customer profile from the data sent to make the transaction.

createProfile Indicates whether to create a customer profile.

If set to true, a customer profile and payment profile will be generated from the customer and payment data.
Boolean.

Either true or false.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

retail The retail element contains two elements: marketType and deviceType. If you submit the retail element, the marketType and deviceType elements are required.

marketType The market type of the transaction.

This element is required if you submit the retail element.
Numeric string.

Either 0 for e-commerce, 1 for MOTO, or 2 for retail. Defaults to 2.

deviceType The type of device submitting the retail transaction.

This element is required if you submit the retail element.
Numeric string.

One of the following:

1 -- unknown device type
2 -- unattended terminal
3 -- self-service terminal
4 -- electronic cash register
5 -- personal computer based terminal
7 -- wireless POS
8 -- website
9 -- dial terminal
10 -- Virtual Terminal

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

profileResponse Contains result of attempt to create a customer payment profile.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

customerProfileId The ID number associated with the customer profile.

Numeric string.

customerPaymentProfileIdList Contains the Customer Payment Profile ID element

numericString The ID number associated with the customer payment profile.

This is only included if the original transaction included a billing address.
Numeric string.

customerShippingProfileIdList Contains the Customer Shipping Profile ID element.

numericString The ID number associated with the customer shipping profile.

This value is only included if the original transaction included a shipping address.
Numeric string.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Authorize a Credit Card

Use this method to authorize a credit card payment. To actually charge the funds you will need to follow up with a capture transaction.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

trackData Conditional.

Applies to Card Present transactions only.

Contains track data read from the customer's card.

Track data contains the full card number and expiration date by default. If you use the trackData element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
track1 Conditional.

Applies to Card Present transactions only.

Track data includes the full card number and expiration date by default. If you send the track1 element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
String, 76 characters.

Do not include the start sentinel (percent sign), end sentinel (question mark), or Longitudinal Redundancy Check.

track2 Conditional.

Applies to Card Present transactions only.

Track data includes the full card number and expiration date by default. If you use the track2 element, do not send the creditCard element. Sending both elements may result in Response Reason Code 153.
String, 37 characters.

Do not include the start sentinel (semicolon), end sentinel (question mark), or Longitudinal Redundancy Check.

creditCard Conditional.

Applies to Card Not Present transactions only.

Contains human-readable information from the customer's card.

cardNumber Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card number.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
Numeric string, 13-16 digits.

expirationDate Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card expiration date.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
String, 7 characters.

Use XML gMonthYear (YYYY-MM) formatting.

cardCode Conditional.

Applies to Card Not Present transactions only.

The customer’s card code.

The three- or four-digit number on the back of a credit card (on the front for American Express).

This field is required if the merchant would like to use the Card Code Verification (CCV) security feature.

Cardholder information must be stored securely and in accordance with the Payment Card Industry (PCI) Data Security Standard.

For more information about PCI, please refer to the Standards, Compliance and Security developer training video at https://developer.authorize.net/training.
Numeric string, 3-4 digits.

profile The following field enables you to create a customer profile from the data sent to make the transaction.

createProfile Indicates whether to create a customer profile.

If set to true, a customer profile and payment profile will be generated from the customer and payment data.
Boolean.

Either true or false.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

retail The retail element contains two elements: marketType and deviceType. If you submit the retail element, the marketType and deviceType elements are required.

marketType The market type for the transaction.

This element is required if you submit the retail element.
Numeric string.

Either 0 for e-commerce, 1 for MOTO, or 2 for retail. Defaults to 2.

deviceType The type of device submitting the retail transaction.

This element is required if you submit the retail element.
Numeric string.

One of the following:

1 -- unknown device type
2 -- unattended terminal
3 -- self-service terminal
4 -- electronic cash register
5 -- personal computer based terminal
7 -- wireless POS
8 -- website
9 -- dial terminal
10 -- Virtual Terminal

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

profileResponse Contains result of attempt to create a customer payment profile.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Capture a Previously Authorized Amount

Use this method to capture funds reserved with a previous authOnlyTransaction transaction request.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use priorAuthCaptureTransaction to capture a previous authOnlyTransaction transaction request.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

refTransId Required.
Transaction ID of the original authOnlyTransaction request.

Numeric string.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Capture Funds Authorized Through Another Channel

Use this method to capture funds which have been authorized through another channel, such as phone authorization. If you need to capture an authorizeOnlyTransaction, use priorAuthCaptureTransaction instead.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use captureOnlyTransaction to generate a transaction using an authorization code obtained from another channel.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

payment Contains payment information for this transaction.

creditCard Applies to Card Not Present transactions only.



Contains human-readable information from the customer's card.

cardNumber Applies to Card Not Present transactions only.



The customer’s credit card number.



Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.

Numeric string, 13-16 digits.

expirationDate Applies to Card Not Present transactions only.



The customer’s credit card expiration date.



Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.

String, 7 characters. Use XML gMonthYear (YYYY-MM) formatting.

cardCode Applies to Card Not Present transactions only.



The customer’s card code.



The three- or four-digit number on the back of a credit card (on the front for American Express).



This field is required if the merchant would like to use the Card Code Verification (CCV) security feature.



Cardholder information must be stored securely and in accordance with the Payment Card Industry (PCI) Data Security Standard.



For more information about PCI, please refer to our Standards, Compliance and Security developer training video.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Refund a Transaction

This transaction type is used to refund a customer for a transaction that was successfully settled through the payment gateway. Note that credit card information and bank account information are mutually exclusive, so you should not submit both.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of transaction.

String.

Use refundTransaction to initiate a refund against a previously settled transaction.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point..

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

creditCard The following elements belong to the creditCard element; include them only for credit card transactions.

When issuing a credit card refund, the request must include either a full card number and expiration date, or the original transaction ID (transId) and last 4 digits of the card number. If you don't have the last 4 digits, you can use getTransactionDetails to retrieve the payment information needed to issue a refund.
cardNumber Required.
The customer’s credit card number.

Only the last four digits are required for credit card refunds.
Numeric string, 4 digits.

expirationDate Required.
The card's expiration date, masked for refunds.

String, four characters.

For refunds, use XXXX instead of the card expiration date.

bankAccount Conditional.

Applies to eCheck.Net transactions only. Used to submit bank account information. If this element is sent, its child elements are required.

For more details please see the eCheck.Net API Documentation.
accountType The type of bank account used for the eCheck.Net transaction.

The value of accountType must be valid for the echeckType value submitted.

For more details please see the eCheck.Net API Documentation.
String.

Either checking, savings, or businessChecking.

routingNumber The ABA routing number.

Numeric string, up to 9 digits.

accountNumber The bank account number.

Numeric string, up to 17 digits.

nameOnAccount Name of the person who holds the bank account.

String, up to 22 characters.

echeckType The type of eCheck transaction.

The value of accountType must be valid for the echeckType value submitted.

For more details please see the eCheck.Net API Documentation.
String.

Either PPD, WEB, CCD, TEL, ARC, or BOC.

bankName The name of the bank.

String, up to 50 characters.

checkNumber Conditional.

The number of the check.

Do not send checkNumber unless echeckType is either ARC or BOC.
Numeric string, up to 15 digits.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

refTransId Conditional.

Transaction ID of the original request.

Required for refunds submitted without Expanded Credit-Return Capabilities (ECC). For ECC transactions, refTransId is not required.
Numeric string.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Void a Transaction

This transaction type can be used to cancel either an original transaction that is not yet settled or an entire order composed of more than one transaction. A Void prevents the transaction or the order from being sent for settlement. A Void can be submitted against any other transaction type

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use voidTransaction to void an unsettled transaction.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

refTransId Required.
Transaction ID of the unsettled transaction you wish to void.

Numeric string.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Update Split Tender Group

Use this function to update the status of an existing order that contains multiple transactions with the same splitTenderId value.

updateSplitTenderGroupRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

splitTenderId Required.
Payment gateway-assigned number associated with the order.

Numeric string.

splitTenderStatus Indicates the status of all transactions associated with the order.

Use voided to void the entire order; use completed to indicate there are no further transactions in this order.
String.

Either voided or completed.

updateSplitTenderGroupResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Debit a Bank Account

Use this method to process an ACH debit transaction using bank account details.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to submit the eCheck transaction for clearance.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

bankAccount Conditional.

Applies to eCheck.Net transactions only. Used to submit bank account information. If this element is sent, its child elements are required.

For more details please see the eCheck.Net API Documentation.
accountType The type of bank account used for the eCheck.Net transaction.

The value of accountType must be valid for the echeckType value submitted.

For more details please see the eCheck.Net API Documentation.
String.

Either checking, savings, or businessChecking.

routingNumber The ABA routing number.

Numeric string, up to 9 digits.

accountNumber The bank account number.

Numeric string, up to 17 digits.

nameOnAccount Name of the person who holds the bank account.

String, up to 22 characters.

echeckType The type of eCheck transaction.

Use ARC or BOC when using a MIRC reader to obtain routingNumber, accountNumber, and checkNumber.
String.

Either PPD, WEB, CCD, TEL, ARC, or BOC.

bankName The name of the bank.

String, up to 50 characters.

checkNumber Conditional.

The number of the check.

Do not send checkNumber unless echeckType is either ARC or BOC.
Numeric string, up to 15 digits.

profile The following field enables you to create a customer profile from the data sent to make the transaction.

createProfile Indicates whether to create a customer profile.

If set to true, a customer profile and payment profile will be generated from the customer and payment data.
Boolean.

Either true or false.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse Contains transaction response fields.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

For this response, defaults to eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Credit a Bank Account

This transaction type is used to refund a customer using a bank account credit transaction.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use refundTransaction to issue a refund against a previously settled eCheck transaction.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

bankAccount Conditional.

Applies to eCheck.Net transactions only. Used to submit bank account information. If this element is sent, its child elements are required.

For more details please see the eCheck.Net API Documentation.
accountType The type of bank account used for the eCheck.Net transaction.

The value of accountType must be valid for the echeckType value submitted.

For more details please see the eCheck.Net API Documentation.
String.

Either checking, savings, or businessChecking.

routingNumber The ABA routing number.

Numeric string, up to 9 digits.

accountNumber The bank account number.

Numeric string, up to 17 digits.

nameOnAccount Name of the person who holds the bank account.

String, up to 22 characters.

echeckType The type of eCheck transaction.

The value of accountType must be valid for the echeckType value submitted.

For more details please see the eCheck.Net API Documentation.
String.

Either PPD, WEB, CCD, TEL, ARC, or BOC.

bankName The name of the bank.

String, up to 50 characters.

checkNumber Conditional.

The number of the check.

Do not send checkNumber unless echeckType is either ARC or BOC.
Numeric string, up to 15 digits.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

refTransId Required.
Transaction ID of the original settled transaction.

Numeric string.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse Contains transaction response information.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

For this API response, defaults to eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Charge a Customer Profile

Use this method to authorize and capture a payment using a stored customer payment profile.
NOTE: You can use Customer Profiles with createTransactionRequest calls by using the profile field and its children as payment information.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to authorize and automatically capture the transaction.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
profile The following fields enable you to charge a transaction using payment or shipping profiles.

customerProfileId Conditional.

The ID of the customer profile.

Required if you are using a customer profile as the source for payment or shipping information.
Numeric string.

paymentProfile Contains payment profile information.

paymentProfileId The customer payment profile ID.

Designates the payment profile to use for payment and billing information. Required if the paymentProfile element exists.
Numeric string.

cardCode Applies to Card Not Present transactions only.

The customer’s card code, which may be collected by the merchant for validation. The card code is not stored with the customer profile.

The three- or four-digit number on the back of a credit card (on the front for American Express).

This field is required if the merchant would like to use the Card Code Verification (CCV) security feature.

Cardholder information must be stored securely and in accordance with the Payment Card Industry (PCI) Data Security Standard.

For more information about PCI, please refer to the Standards, Compliance and Security developer training video at https://developer.authorize.net/training.
Numeric string, 3-4 digits.

shippingProfileId The customer shipping profile ID.

Conditional.

This field is mutually exclusive with the shipTo element. Use one or the other.
Numeric string.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

profileResponse Contains result of attempt to create a customer payment profile.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

customerProfileId The ID of the customer profile.

Numeric string.

customerPaymentProfileIdList Contains the Customer Payment Profile ID element

numericString Payment gateway assigned ID associated with the customer payment profile.

This is only included if the original transaction included a billing address.
Numeric string.

customerShippingProfileIdList Contains the Customer Shipping Profile ID element.

numericString Payment gateway assigned ID associated with the customer shipping profile.

This is only included if the original transaction included a shipping address.
Numeric string.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Charge a Tokenized Credit Card

Use this method to authorize and capture a payment using a tokenized credit card number. The processor must support payment network tokenization and the token must have been issued by a certified token provider.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to authorize and automatically capture the transaction.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

creditCard Contains tokenized credit card information.

cardNumber Required.
The credit card token.

Numeric string, 13-16 digits.

expirationDate Required.
The token's expiration date.

Use the value of the token's expiration date, not the card's expiration date.
String, 7 characters.

Use XML gMonthYear (YYYY-MM) formatting.

isPaymentToken Flag to indicate the credit card is a payment network token.

Set to true for recurring tokenized transactions.
Boolean.

Either true or false.

cryptogram Required.
Set this to the value of the cryptogram received from the token provider.

This field confirms that the payment data is tokenized, and it must be submitted when the credit card number is a tokenized credit card.
String.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

retail The retail element contains two elements: marketType and deviceType. If you submit the retail element, the marketType and deviceType elements are required.

marketType The market type for the transaction.

This element is required if you submit the retail element.
Numeric string.

Either 0 for e-commerce, 1 for MOTO, or 2 for retail. Defaults to 2.

deviceType The type of device submitting the retail transaction.

This element is required if you submit the retail element.
Numeric string.

One of the following:

1 -- unknown device type
2 -- unattended terminal
3 -- self-service terminal
4 -- electronic cash register
5 -- personal computer based terminal
7 -- wireless POS
8 -- website
9 -- dial terminal
10 -- Virtual Terminal

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Create an Accept Payment Transaction

Use this function to create an Authorize.Net payment transaction request, using the Accept Payment Nonce in place of card data.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to authorize and automatically capture the transaction, or use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment This element contains payment information.

opaqueData Required.
Contains dataDescriptor and dataValue.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.ACCEPT.INAPP.PAYMENT for Accept transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data, known as the payment nonce. The nonce is valid for 15 minutes.

The payment gateway expects the encrypted payment data and meta data for the encryption keys.
String, 8192 characters.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Get an Accept Payment Page

Use this function to retrieve a form token which can be used to request the Authorize.Net Accept hosted payment page. For more information on using the hosted payment page, see the Accept Hosted Feature Details page.

getHostedPaymentPageRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The merchant API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Required.
Type of credit card transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to authorize and automatically capture the transaction, or use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
profile The following fields enable you to charge a transaction using payment or shipping profiles.

customerProfileId The ID of the customer profile.

If this value is included in the response, the customer will be able to choose saved payment methods in the payment form.
Numeric string.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

For example, 5.4321.
name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

For example, janedoe@example.com.
billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

For example, (123) 555-1234.
shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

hostedPaymentSettings Required.
This is an array of settings for the session.

Within this element, you must also submit at least one setting. For more information on these parameters, see the 'Hosted Form Parameter Settings' section in our Accept Hosted feature details page.
setting Contains settingName and settingValue.

settingName Conditional.

One of:
hostedPaymentReturnOptions
hostedPaymentButtonOptions
hostedPaymentStyleOptions
hostedPaymentPaymentOptions
hostedPaymentSecurityOptions
hostedPaymentShippingAddressOptions
hostedPaymentBillingAddressOptions
hostedPaymentCustomerOptions
hostedPaymentOrderOptions
hostedPaymentIFrameCommunicatorUrl

String.

settingValue Parameters and values for the specific setting.

For more information on possible parameters for settingValue, see the 'Hosted Form Parameter Settings' section in our Accept Hosted feature details page.
String.

getHostedPaymentPageResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value will be included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

token An encrypted string that the merchant must include when posting to the Authorize.Net web page.
If not used within 15 minutes of the original API call, this token expires.

String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Mobile In-App Transactions

Enables you to pass Accept Mobile, Apple Pay, or Android Pay payment data to Authorize.Net. For more information about in-app payment transactions, see the Mobile In-App Feature Details page.

Create an Accept Transaction

Use this function to create an Authorize.Net payment transaction request, using the Accept Payment Nonce in place of card data.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authCaptureTransaction to authorize and automatically capture the transaction.

Use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

payment This element contains payment information.

opaqueData Required.
Contains dataDescriptor and dataValue.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.ACCEPT.INAPP.PAYMENT for Accept transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data known as the payment nonce. The nonce is valid for 15 minutes.

The payment gateway expects the encrypted payment data and meta data for the encryption keys.
String, 8192 characters.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

terminalNumber The merchant's in-store terminal number. Can identify the cashiers or kiosks used.

Do not use your processor's terminal ID for this field.
String.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

cardholderAuthentication Merchants using a third party cardholder authentication solution can submit the following authentication values with Visa and Mastercard transactions.

Invalid combinations of card type, authenticationIndicator, and cardholderAuthenticationValue will result in Response Reason Code 118.
authenticationIndicator Conditional.

The Electronic Commerce Indicator (ECI) value for a Visa transaction, or the Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the ECI or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of authenticationIndicator will result in Response Reason Code 116.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

cardholderAuthenticationValue Conditional.

The Cardholder Authentication Verification Value (CAVV) for a Visa transaction, or Accountholder Authentication Value (AVV)/ Universal Cardholder Authentication Field indicator (UCAF) for a Mastercard transaction. The cardholder authentication process generates the CAVV, AAV, or UCAF value prior to submitting the transaction.

Required only for authorizationOnlyTransaction and authCaptureTransaction requests processed through 3D Secure cardholder authentication programs, such as Verified by Visa or SecureCode. When submitted with other values for transactionValue, this element is ignored.

Invalid values of cardholderAuthenticationValue will result in Response Reason Code 117.

This field is currently supported through Chase Paymentech, FDMS Nashville, Global Payments and TSYS.
String.

employeeId Merchant-assigned employee ID.

This field is required for the EVO processor, and is supported on the TSYS processor.
Numeric string, 4 digits. Defaults to 0000.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

surcharge Used to record payment card surcharges that are passed along to customers. Contains an amount and a description child element.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
amount Amount of the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

description Describes the reason or details for the surcharge.

Currently supported for TSYS merchants.

For details on surcharge rules, please see Visa's merchant regulations and fees.
String, up to 255 characters.

merchantDescriptor Provides the option to submit a soft descriptor that will appear on the cardholder's statement after settlement.

Currently supported for TSYS merchants.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

tip The amount of the tip authorized by the cardholder.

The total transaction amount must include this value.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains one or more message elements.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Create an Apple Pay Transaction

Use this function to create an Authorize.Net payment transaction request using Apple Pay data in place of card data.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authCaptureTransaction to authorize and automatically capture the transaction. Use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

payment This element contains payment information.

opaqueData Required.
Contains dataDescriptor and dataValue.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.APPLE.INAPP.PAYMENT for Apple Pay transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data known as the payment nonce. The nonce is valid for 15 minutes.

The payment gateway expects the encrypted payment data and meta data for the encryption keys.
String, 8192 characters.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

retail The retail element contains two elements: marketType and deviceType. If you submit the retail element, the marketType and deviceType elements are required.

marketType The market type for the transaction.

This element is required if you submit the retail element. For Apple Pay transactions, set marketType to 0.
Numeric string.

Either 0 for e-commerce, 1 for MOTO, or 2 for retail. Defaults to 2.

deviceType The type of device submitting the retail transaction.

This element is required if you submit the retail element.
Numeric string.

One of the following:

1 -- unknown device type
2 -- unattended terminal
3 -- self-service terminal
4 -- electronic cash register
5 -- personal computer based terminal
7 -- wireless POS
8 -- website
9 -- dial terminal
10 -- Virtual Terminal

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

transactionResponse This element contains the transaction response, including AVS, CVV, and CAVV details.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains one or more message elements.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Create an Android Pay Transaction

Use this function to create an Authorize.Net payment transaction request using Android Pay data in place of card data.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authCaptureTransaction to authorize and automatically capture the transaction. Use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

payment This element contains payment information.

opaqueData Required.
Contains dataDescriptor and dataValue.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.ANDROID.INAPP.PAYMENT for Android Pay transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data known as the payment nonce. The nonce is valid for 15 minutes.

The payment gateway expects the encrypted payment data and meta data for the encryption keys.
String, 8192 characters.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

order Contains information about the order.

invoiceNumber Merchant-defined invoice number associated with the order.

String, up to 20 characters.

description Description of the item purchased.

String, up to 255 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

taxable Indicates whether the item is taxable.

Boolean.

Either true or false.

tax Contains information about applicable taxes.

amount Amount of tax.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of tax.

String, up to 31 characters.

description Description of tax.

String, up to 255 characters.

duty Contains information about any duty applied.

amount Amount of duty.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of duty.

String, up to 31 characters.

description Description of duty.

String, up to 255 characters.

shipping Items in this element describe shipping charges applied.

amount Amount of the shipping charges.

The total transaction amount must include this value.
Decimal, up to four decimal places.

name Name of the shipping charges.

String, up to 31 characters.

description Description of the shipping charges.

String, up to 255 characters.

taxExempt Indicates whether or not order is exempt from tax.

Boolean.

Either true or false.

poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customer The following fields contain customer information.

type Type of customer.

String.

Either individual or business.

id The unique customer ID used to represent the customer associated with the transaction.

If you use customer IDs, your solution should generate the customer ID and send it with your transaction requests. Authorize.Net does not generate customer IDs.
String, up to 20 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

email Conditional.

The customer’s valid email address.

Required only when using a European payment processor.

If you enable Email Receipts in the Merchant Interface, and if the email address format is valid, the customer will receive an Authorize.Net generated email receipt.
String, up to 255 characters.

billTo This element contains billing address information.

If EVO is your payment processor and you submit any of the following billTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

company Company associated with customer’s billing address.

String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

phoneNumber Phone number associated with customer’s billing address.

String, up to 25 characters.

faxNumber Fax number associated with customer’s billing address.

String, up to 25 characters.

shipTo This element contains shipping information.

If EVO is your payment processor and you submit any of the following shipTo fields, you must submit all of them.

firstName
lastName
address
city
state
zip
firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

company Company associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number or bank account number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, JCB, or eCheck.

messages This element contains one or more message elements.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to 6 characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Visa Checkout

Visa Checkout enables you to pass Visa Checkout payment data to Authorize.Net. For more information about Authorize.Net's implementation of Visa Checkout, see the Visa Checkout feature details page.

Decrypt Visa Checkout Data

Use this method to decrypt a Visa Checkout encrypted payment data to retrieve information such as shipping address, tax amounts, and card art.

decryptPaymentDataRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

opaqueData Required.
Contains dataDescriptor, dataValue, and dataKey.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.VCO.ONLINE.PAYMENT for Visa Checkout transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data.

The payment gateway expects the encrypted payment data and metadata for the encryption keys.

Use the JavaScript Visa Checkout integration's encPaymentData field to obtain the value for dataValue.
String, 8192 characters.

dataKey The encryption key used to encrypt the payment data.

Use the JavaScript Visa Checkout integration's encKey field to obtain the value for dataKey.
String, up to 128 characters.

callId Transaction ID generated by the Visa Checkout SDK.

String.

decryptPaymentDataResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to six characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

shippingInfo This element is a container for the customer's shipping information.

firstName First name associated with customer’s shipping address.

String, up to 50 characters.

lastName Last name associated with customer’s shipping address.

String, up to 50 characters.

address Customer’s shipping address.

String, up to 60 characters.

city City of customer’s shipping address.

String, up to 40 characters.

state State of customer’s shipping address.

String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip The postal code of customer’s shipping address.

String, up to 20 characters.

country Country of customer’s shipping address.

String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

billingInfo This element is a container for the customer's billing information.

firstName Conditional.

First name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

lastName Conditional.

Last name associated with customer’s billing address.

Required only when using a European payment processor.
String, up to 50 characters.

address Conditional.

Customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 60 characters.

city Conditional.

City of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

state Conditional.

State of customer’s billing address.

Required only when using a European payment processor.
String, up to 40 characters.

For US states, use the USPS two-character abbreviation for the state.

zip Conditional.

The postal code of customer’s billing address.

Required if merchant would like to use the Address Verification Service security feature.

Required when using GPN Canada or Worldpay Streamline Processing Platform.
String, up to 20 characters.

country Conditional.

Country of customer’s billing address.

Required only when using a European payment processor.
String, up to 60 characters.

For international payment processors, use the ISO 3166 alpha-3 code for the country.

email Conditional.

The customer’s valid email address.

String, up to 255 characters.

For example, janedoe@example.com.
cardInfo This element is a container for the customer's card information, obtained from Visa Checkout.

cardNumber Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card number.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
Numeric string, 13-16 digits.

expirationDate Conditional.

Applies to Card Not Present transactions only.

The customer’s credit card expiration date.

Only use cardNumber and expirationDate for Card Present transactions if the track data is unavailable. Note that using cardNumber and expirationDate in Card Present transactions may result in higher merchant rates.
String, 7 characters.

Use XML gMonthYear (YYYY-MM) formatting.

cardArt This element is a container for card art information.

cardBrand Brand of the credit card.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

cardImageHeight Image height in pixels.

Numeric string.

cardImageUrl URL where the card art can be found.

String.

cardImageWidth Image width in pixels.

Numeric string.

cardType The type of account associated with the card.

String. Either debit or credit.

paymentDetails This element is a container for various payment details.

currency Currency of the transaction.

String.

Use USD as the currency.

promoCode Optional promotion code.

String.

misc Miscellaneous optional charges.

Numeric string.

giftWrap Value of gift wrapping charge.

Numeric string.

discount Value of discount, if any.

Numeric string.

tax Value of tax.

Numeric string.

shippingHandling Value of shipping and handling charges.

Numeric string.

subTotal Value of the subtotal.

Numeric string.

orderID Order identification number.

Numeric string.

amount Value of the total amount.

Numeric string.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

Create a Visa Checkout Transaction

Use this function to create an Authorize.Net payment transaction request using Visa Checkout data in place of card data.
Order, tax, duty, shipping, customer, billing, and shipping information are obtained from Visa Checkout so you are not required to submit those fields.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest Required.
This element is a container for transaction specific information.

transactionType Type of credit card transaction.

If the value submitted does not match a supported value, the transaction is rejected.
String.

Use authCaptureTransaction to authorize and automatically capture the transaction, or use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This field allows the customer to choose a payment method in the lightbox, but then approve the amount directly on the merchant's site. The merchant only receives the shipping address after the lightbox authorization is complete, so you may need to add shipping and other charges afterward.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.
payment Required.
This element contains payment information.

opaqueData Required.
Contains dataDescriptor, dataValue, and dataKey.

dataDescriptor Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.
String, 128 characters.

Use COMMON.VCO.ONLINE.PAYMENT for Visa Checkout transactions.

dataValue Required.
Base64 encoded data that contains encrypted payment data. The payment gateway expects the encrypted payment data and metadata for the encryption keys.

Use the JavaScript Visa Checkout integration's encPaymentData field to obtain the value for dataValue.
String, 8192 characters.

dataKey The encryption key used to encrypt the payment data.

Use the JavaScript Visa Checkout integration's encKey field to obtain the value for dataKey.
String, up to 128 characters.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

name The name is generated by the solution provider and provided to Authorize.Net.

See the Solution ID Implementation Guide for details.
String, up to 255 characters.

callId The transaction ID generated by the Visa Checkout SDK.

String.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.

name The human-readable name for the item.

String, up to 31 characters.

description A description of the item.

String, up to 255 characters.

quantity The quantity of items sold.

Decimal, up to four decimal places.

For example, 5.4321.
unitPrice The cost per unit, excluding tax, freight, and duty.

Decimal, up to four decimal places.

For example, 5.4321.
poNumber The merchant-assigned purchase order number.

If you use purchase order numbers, your solution should generate the purchase order number and send it with your transaction requests. Authorize.Net does not generate purchase order numbers.
String, up to 25 characters.

Use alphanumeric characters only, without spaces, dashes, or other symbols.

customerIP Conditional.

The IPv4 address of the customer initiating the transaction. Defaults to 255.255.255.255 if not included in your request.

Required only when the merchant is using customer IP based AFDS filters.
String, up to 15 characters.

Use dot-decimal formatting.

For example, 255.255.255.255.
retail The retail element contains two elements: marketType and deviceType. If you submit the retail element, the marketType and deviceType elements are required.

marketType Conditional.
0 for ecommerce
1 for MOTO
2 for retail

For Visa Checkout transactions, set to 0. This element is required if you submit the retail element.
Numeric string.

Either 0 for e-commerce, 1 for MOTO, or 2 for retail. Defaults to 2.

deviceType The type of device submitting the retail transaction.

This element is required if you submit the retail element.
Numeric string.

One of the following:

1 -- unknown device type
2 -- unattended terminal
3 -- self-service terminal
4 -- electronic cash register
5 -- personal computer based terminal
7 -- wireless POS
8 -- website
9 -- dial terminal
10 -- Virtual Terminal

transactionSettings This element contains one or more setting elements.

setting Contains settingName and settingValue.

settingName Name of a specific setting to be modified for this transaction.

For a list of valid settingName values and their uses, please see the Transaction Settings section of the Payment Transactions page.
String.

One of the following:
allowPartialAuth
duplicateWindow
emailCustomer
headerEmailReceipt
footerEmailReceipt
recurringBilling

settingValue Indicates whether the specified setting is enabled or disabled.

For a list of permitted settingValue formats, please see the Transaction Settings section of the Payment Transactions page.
String.

Permitted values depend on the value of settingName.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

createTransactionResponse

Element Description Format
refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

messages This element contains a resultCode and one or more message elements.

resultCode States whether the request was handled successfully, or ended with an error.

String.

Either Ok or Error.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to six characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

transactionResponse
responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

avsResultCode Address Verification Service (AVS) response code.

String, 1 character.

One of the following:

A -- The street address matched, but the postal code did not.
B -- No address information was provided.
E -- The AVS check returned an error.
G -- The card was issued by a bank outside the U.S. and does not support AVS.
N -- Neither the street address nor postal code matched.
P -- AVS is not applicable for this transaction.
R -- Retry — AVS was unavailable or timed out.
S -- AVS is not supported by card issuer.
U -- Address information is unavailable.
W -- The US ZIP+4 code matches, but the street address does not.
X -- Both the street address and the US ZIP+4 code matched.
Y -- The street address and postal code matched.
Z -- The postal code matched, but the street address did not.

cvvResultCode Card code verification (CCV) response code.

String, 1 character.

One of the following:

M -- CVV matched.
N -- CVV did not match.
P -- CVV was not processed.
S -- CVV should have been present but was not indicated.
U -- The issuer was unable to process the CVV check.

cavvResultCode Cardholder authentication verification response code.

Note: Mastercard transactions always return a null result for this element. Consequently, transaction details for Mastercard transactions do not contain CAVV results.
String, 1 character.

One of the following:

Blank or not present -- CAVV not validated.
0 -- CAVV was not validated because erroneous data was submitted.
1 -- CAVV failed validation.
2 -- CAVV passed validation.
3 -- CAVV validation could not be performed; issuer attempt incomplete.
4 -- CAVV validation could not be performed; issuer system error.
5 -- Reserved for future use.
6 -- Reserved for future use.
7 -- CAVV failed validation, but the issuer is available. Valid for U.S.-issued card submitted to non-U.S acquirer.
8 -- CAVV passed validation and the issuer is available. Valid for U.S.-issued card submitted to non-U.S. acquirer.
9 -- CAVV failed validation and the issuer is unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
A -- CAVV passed validation but the issuer unavailable. Valid for U.S.-issued card submitted to non-U.S acquirer.
B -- CAVV passed validation, information only, no liability shift.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

refTransId The transaction ID of a related, previously settled transaction.

Numeric string.

transHash Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response.

String.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

messages This element contains one or more message elements.

message Contains details about the result.

code The code number for the result.

For a comprehensive list of possible values, or to look up a returned value, see the Response Code Tool.
String, up to six characters.

The first character is either an I for informational responses, or E for error responses. The remaining characters are numeric and indicate the type of informational or error response.

For example, I00001 or E00001.
text Text explanation of the code for the result.

String.

errors This element contains one or more error elements.

error This element contains detailed information about any errors returned.

errorCode Error code returned.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

errorText Text description of error.

For a complete list of response codes, see the Response Code Tool.
String.

splitTenderPayments If the transaction was a partial authorization transaction, then the split tender payment details are contained in this element.

splitTenderPayment Contains information about one split tender transaction.

transId The Authorize.Net assigned identification number for a transaction.

Use this value to reference at a later time the transaction generated by this API call. You may need the transaction ID for follow-on transactions such as credits, voids, and captures of unsettled transactions, as well as for reporting calls.
Numeric string.

responseCode The overall status of the transaction.

String.

One of the following:

1 -- Approved
2 -- Declined
3 -- Error
4 -- Held for Review

responseToCustomer The response reason code.

For a complete list of response codes, see the Response Code Tool.
Numeric string.

authCode The authorization code granted by the card issuing bank for this transaction.

String, 6 characters.

accountNumber The masked card number used for the transaction.

String.

For example, XXXX1234.
accountType The account type used for the transaction.

String.

Either Visa, Mastercard, Discover, AmericanExpress, DinersClub, or JCB.

requestedAmount Amount requested in original authorization.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

approvedAmount Amount approved.

Present if the current transaction is for a prepaid card or if a splitTenderId value was sent.
Numeric string.

balanceOnCard Balance on the debit card or prepaid card.

Can be a positive or negative number. Has a value only if the current transaction is for a prepaid card.
Numeric string.

userFields These elements may be used to pass through information, such as session IDs and order details. The merchant will receive these elements in the response, exactly as it was submitted in the request. Authorize.Net will not store these values.

Do not use these fields to pass through sensitive details as doing so may be a violation of the PCI Data Security Standard.

userField The element for individual user-defined fields. Contains the name and value child elements.

Up to 20 userField elements may be submitted per request.
String.

name Name of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

value Value of the user-defined field.

User reference field provided for the merchant’s use. The merchant will receive this field in the response, exactly as it was submitted in the request. Authorize.Net will not store this value.
String.

Request:

Live API Console requests are not supported in IE9 or below.

Enter your sandbox credentials below to automatically insert them into all of the sample requests in this API Reference page. You can quickly sign up for a sandbox account here.

Okay, you're in a real hurry right now... We understand. Click here to use our default sandbox credentials.

Response:
Loading...
View :

This sample PHP code demonstrates how to perform this function using our PHP SDK.

URL:

This sample C# code demonstrates how to perform this function using our .NET SDK.

URL:

This sample Java code demonstrates how to perform this function using our Java SDK.

URL:

This sample Ruby code demonstrates how to perform this function using our Ruby SDK.

URL:

This sample Python code demonstrates how to perform this function using our Python SDK.

URL:

This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.

URL:

PayPal Express Checkout

Use the following methods to process PayPal transactions. You must first sign up for the service in the Merchant Interface. The sign-up page is at Accounts > Digital Payment Solutions.

The following calls are createTransactionRequest calls with PayPal-specific fields. For more information about our implementation of PayPal Checkout Express, see the PayPal feature details page.

Note: Billing and shipping request fields are used only if the customer wants to use an address different than the one stored in their PayPal billing and shipping profiles. If you provide these fields, PayPal will validate the address to ensure that it is a valid address. The transaction is declined if PayPal’s validation fails. Billing and shipping fields are present in the Authorization and Authorization and Capture request calls.

Authorization Only

An Authorization Only request notifies PayPal that an authorization has been initiated but does not complete the authorization. It returns a secure URL with a token appended to it. The purpose of this token is to identify the transaction when the customer is redirected to PayPal.

createTransactionRequest

Element Description Format
merchantAuthentication Required.
Contains merchant authentication information.

name Required.
Merchant’s unique API Login ID.

The API Login ID is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 25 characters.

transactionKey Required.
Merchant’s unique Transaction Key.

The merchant Transaction Key is provided in the Merchant Interface and must be stored securely.

The API Login ID and Transaction Key together provide the merchant authentication required for access to the payment gateway.
String, up to 16 characters.

refId Merchant-assigned reference ID for the request.

If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
String, up to 20 characters.

transactionRequest This element is a container for transaction specific information.

transactionType Type of credit card transaction.

String.

Use authOnlyTransaction to authorize the transaction for capture at a later time.

amount Required.
Amount of the transaction.

This is the total amount and must include tax, shipping, tips, and any other charges.
Decimal, up to 15 digits with a decimal point.

Do not use currency symbols.

For example, 8.95.

payment This element contains payment information.

payPal This element contains PayPal order information.

successURL URL to which the customer's browser returns when the customer chooses to pay with PayPal.

String.

A valid and well-formed URL.

For example, https://example.com/Success/TC25262
cancelURL URL to which the customer's browser returns when the customer chooses not to pay with PayPal.

String.

A valid and well-formed URL.

For example, https://example.com/Cancel/TC25262
payPalLc Locale of pages displayed by PayPal during Express Checkout.

Defaults to US.
String.

One of:

AU -- Australia
CAN -- Canada
DE -- Germany
ES -- Spain
FR -- France
GB -- United Kingdom
IT -- Italy
US -- United States

paypalHdrImg URL for the image that will be displayed in the upper left area of the payment page.

String.

A valid and well-formed URL.

For example, https://example.com/images/logo.gif
PaypalPayflowcolor Background color for the payment page.

solution Contains information about the software that generated the transaction.

id The unique Solution ID which you generate and associate with your solution through the Partner Interface.

See the Solution ID Implementation Guide for details.
String, up to 50 characters.

lineItems Contains one or more lineItem elements, up to a maximum of 30 line items.

lineItem Contains information about one item.

itemId Item identification.

String, up to 31 characters.