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.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "HW617E",
"avsResultCode": "Y",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "2157047189",
"refTransID": "",
"transHash": "E7CEB0A9F1BECA32A02493E1B31D5955",
"testRequest": "0",
"accountNumber": "XXXX1111",
"accountType": "Visa",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"transHashSha2": "D0C4FFF5648511A5862B917CFD9BB78ABF8A6E1D90C119CBBC4C0B454F4FF40DED15B204E042F36ECA5FB15D02588E4E4A7B85B94E7279599CE6020462CB7DEE",
"SupplementalDataQualificationIndicator": 0,
"networkTransId": "123456789NNNH"
},
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. |
|
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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 | Important: This field is deprecated and should not be used. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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 type2 -- unattended terminal3 -- self-service terminal4 -- electronic cash register5 -- personal computer based terminal7 -- wireless POS8 -- website9 -- dial terminal10 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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. |
processingOptions | Contains details for additional transaction processing. Required if the merchant stores card-on-file payment information. |
|
isFirstRecurringPayment | Indicates the initial zero-dollar authorization or the first recurring payment in a series of charges. Required if the merchant stores card-on-file payment information. Set recurringBilling to true if you set isFirstRecurringPayment . |
Boolean. |
isFirstSubsequentAuth | Indicates the initial zero-dollar authorization or the first payment in a series of charges. Required if the merchant stores card-on-file payment information. |
Boolean. |
isSubsequentAuth | Indicates that the transaction is a follow-on transaction for an established customer. Use in these situations:
Required if the merchant stores card-on-file payment information. |
Boolean. |
isStoredCredentials | Indicates that the transaction was initiated by the customer using card-on-file payment information. Required if the merchant stores card-on-file payment information. |
Boolean. |
subsequentAuthInformation | Contains details for subsequent authorizations using a payment card stored by the merchant. Required if the merchant stores card-on-file payment information. |
|
originalNetworkTransId | Required. The network transaction ID returned in response to the original card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
String, up to 255 characters. |
reason | Required. Describes the reason for the subsequent card-on-file transaction. Use resubmission for resubmitting the original charge if declined, and if the customer has already received goods or services.Use delayedCharge if there are supplemental charges after the original charge was submitted and the customer has received the goods or services.Use reauthorization for new transactions submitted after the original transaction, for example, for split or delayed shipments of goods, or for extended services beyond those originally requested.Use noShow for penalties after cancellation of services, for example, when a customer does not appear after making a reservation. |
String. Either resubmission , delayedCharge , reauthorization , or noShow . |
originalAuthAmount | Required. The original authorization amount. Store the amount of the original card-on-file transaction response. Set the originalAuthAmount to the original amount value for all subsequent authorizations against the same card-on-file. |
Decimal, up to 15 digits with a decimal point. Required for Discover, Diners Club, JCB, and China Union Pay transactions. Do not use currency symbols. |
authorizationIndicator | Indicates whether the authorization was a pre-authorization or final authorization. Applicable to Mastercard only. Use pre for initial authorizations, for example, prior to tips. Use final for final authorizations, for example, including tips. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
networkTransId | Required. The network transaction ID returned in response to the requested card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
String, up to 255 characters. |
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. |
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. |
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.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "HH5414",
"avsResultCode": "Y",
"cvvResultCode": "S",
"cavvResultCode": "6",
"transId": "2149186848",
"refTransID": "",
"transHash": "FE3CE11E9F7670D3ECD606E455B7C222",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"userFields": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
],
"networkTransId": "123456789NNNH"
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. |
|
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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 | Important: This field is deprecated and should not be used. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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 type2 -- unattended terminal3 -- self-service terminal4 -- electronic cash register5 -- personal computer based terminal7 -- wireless POS8 -- website9 -- dial terminal10 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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. |
processingOptions | Contains details for additional transaction processing. Required if the merchant stores card-on-file payment information. |
|
isFirstRecurringPayment | Indicates the initial zero-dollar authorization or the first recurring payment in a series of charges. Required if the merchant stores card-on-file payment information. Set recurringBilling to true if you set isFirstRecurringPayment . |
Boolean. |
isFirstSubsequentAuth | Indicates the initial zero-dollar authorization or the first payment in a series of charges. Required if the merchant stores card-on-file payment information. |
Boolean. |
isSubsequentAuth | Indicates that the transaction is a follow-on transaction for an established customer. Use in these situations:
Required if the merchant stores card-on-file payment information. |
Boolean. |
isStoredCredentials | Indicates that the transaction was initiated by the customer using card-on-file payment information. Required if the merchant stores card-on-file payment information. |
Boolean. |
subsequentAuthInformation | Contains details for subsequent authorizations using stored payment information. Required if the merchant stores card-on-file payment information. |
|
originalNetworkTransId | Required. The network transaction ID returned in response to the original card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
String, up to 255 characters. |
reason | Required. Describes the reason for the subsequent card-on-file transaction. Use resubmission for resubmitting the original charge if declined, and if the customer has already received goods or services.Use delayedCharge if there are supplemental charges after the original charge was submitted and the customer has received the goods or services.Use reauthorization for new transactions submitted after the original transaction, for example, for split or delayed shipments of goods, or for extended services beyond those originally requested.Use noShow for penalties after cancellation of services, for example, when a customer does not appear after making a reservation. |
String. Either resubmission , delayedCharge , reauthorization , or noShow . |
originalAuthAmount | Required. The original authorization amount. Store the amount of the original card-on-file transaction response. Set the originalAuthAmount to the original amount value for all subsequent authorizations against the same card-on-file. |
Decimal, up to 15 digits with a decimal point. Required for Discover, Diners Club, JCB, and China Union Pay transactions. Do not use currency symbols. |
authorizationIndicator | Indicates whether the authorization was a pre-authorization or final authorization. Applicable to Mastercard only. Use pre for initial authorizations, for example, prior to tips. Use final for final authorizations, for example, including tips. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
networkTransId | Required. The network transaction ID returned in response to the requested card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
String, up to 255 characters. |
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. |
text | Text explanation of the code for the result. |
String. |
Capture a Previously Authorized Amount
Use this method to capture funds reserved with a previous authOnlyTransaction
transaction request.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "HH5414",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "1234567890",
"refTransID": "1234567890",
"transHash": "FE3CE11E9F7670D3ECD606E455B7C222",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three 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 authOnlyTransaction request. |
Numeric string. |
order | Contains information about the order. |
|
invoiceNumber | Merchant-defined invoice number associated with the order. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. This field is currently supported through Chase Paymentech and Elavon during Prior Authorization Capture. |
String, up to 20 characters. |
description | Description of the item purchased. This field is currently supported through Chase Paymentech and Elavon during Prior Authorization Capture. |
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. |
text | Text explanation of the code for the result. |
String. |
transactionResponse | ||
responseCode | The overall status of the transaction. |
String. One of the following: 1 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
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.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "ROHNFQ",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "2149186851",
"refTransID": "",
"transHash": "E385C13A873EC470BB9AD7C2C9D02D13",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. |
|
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 | Required. The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
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.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "HW617E",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "1234569999",
"refTransID": "1234567890",
"transHash": "D04B060066BA442AFF73A31B97A4693F",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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. |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. Authorization codes for refunds only apply to Visa and Discover transactions submitted through FDC Nashville, and to Visa, American Express, and Discover transactions submitted through TSYS. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
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
{
"transactionResponse": {
"responseCode": "1",
"authCode": "HH5414",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "1234567890",
"refTransID": "1234567890",
"transHash": "D3A855F0934EB404DE3B13508D0E3826",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
text | Text explanation of the code for the result. |
String. |
transactionResponse | ||
responseCode | The overall status of the transaction. |
String. One of the following: 1 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
Update Split Tender Group
Use this function to update the status of an existing order that contains multiple transactions with the same splitTenderId
value.
{
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The specified SplitTenderID is invalid."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
description | Text explanation of the code for the result. |
String. |
Debit a Bank Account
Use this method to process an ACH debit transaction using bank account details.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "2149186917",
"refTransID": "",
"transHash": "803D51FDF65043182BF264B8BAA8B2DF",
"accountNumber": "XXXXX6789",
"accountType": "eCheck",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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 -- Approved2 -- Declined3 -- Error4 -- 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
String. |
accountNumber | The masked bank account number used for the transaction. |
String. |
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. |
description | 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
Credit a Bank Account
This transaction type is used to refund a customer using a bank account credit transaction.
{
"transactionResponse": {
"responseCode": "3",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "0",
"refTransID": "2149181544",
"transHash": "D6C9036F443BADE785D57DA2B44CD190",
"accountNumber": "XXXX5678",
"accountType": "eCheck",
"errors": [
{
"errorCode": "16",
"errorText": "The transaction cannot be found."
}
]
},
"refId": "123456",
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. |
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 -- Approved2 -- Declined3 -- Error4 -- 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
String. |
accountNumber | The masked bank account number used for the transaction. |
String. |
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. |
description | 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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
String, up to 20 characters. |
description | Description of the item purchased. |
String, up to 255 characters. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
Charge a Customer Profile
Use this method to authorize and capture a payment using a stored customer payment profile.
Important: You can use Customer Profiles with createTransactionRequest
calls by using the profile field and its children as payment information.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "4JYKA2",
"avsResultCode": "Y",
"cvvResultCode": "P",
"cavvResultCode": "2",
"transId": "2157786076",
"refTransID": "",
"transHash": "",
"testRequest": "0",
"accountNumber": "XXXX2222",
"accountType": "Visa",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"transHashSha2": "",
"profile": {
"customerProfileId": "40338125",
"customerPaymentProfileId": "1000177237"
},
"SupplementalDataQualificationIndicator": 0,
"networkTransId": "6PUPU4XXWSO7CCQL0YJNYY7"
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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. |
|
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. |
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 | Important: This field is deprecated and should not be used. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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. |
processingOptions | Contains details for additional transaction processing. Required if the merchant stores card-on-file payment information. |
|
isFirstRecurringPayment | Indicates the initial zero-dollar authorization or the first recurring payment in a series of charges. Required if the merchant stores card-on-file payment information. Set recurringBilling to true if you set isFirstRecurringPayment . |
Boolean. |
isFirstSubsequentAuth | Indicates the initial zero-dollar authorization or the first payment in a series of charges. Required if the merchant stores card-on-file payment information. |
Boolean. |
isSubsequentAuth | Indicates that the transaction is a follow-on transaction for an established customer. Use in these situations:
Required if the merchant stores card-on-file payment information. |
Boolean. |
isStoredCredentials | Indicates that the transaction was initiated by the customer using card-on-file payment information. Required if the merchant stores card-on-file payment information. |
Boolean. |
subsequentAuthInformation | Contains details for subsequent authorizations using stored payment information. Required if the merchant stores card-on-file payment information. |
|
originalNetworkTransId | Required. The network transaction ID returned in response to the original card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
Alphanumeric string, 255 characters or fewer. |
reason | Required. Describes the reason for the subsequent card-on-file transaction. Use resubmission for resubmitting the original charge if declined, and if the customer has already received goods or services.Use delayedCharge if there are supplemental charges after the original charge was submitted and the customer has received the goods or services.Use reauthorization for new transactions submitted after the original transaction, for example, for split or delayed shipments of goods, or for extended services beyond those originally requested.Use noShow for penalties after cancellation of services, for example, when a customer does not appear after making a reservation. |
String. Either resubmission , delayedCharge , reauthorization , or noShow . |
originalAuthAmount | Required. The original authorization amount. Store the amount of the original card-on-file transaction response. Set the originalAuthAmount to the original amount value for all subsequent authorizations against the same card-on-file. |
Decimal, up to 15 digits with a decimal point. Required for Discover, Diners Club, JCB, and China Union Pay transactions. Do not use currency symbols. |
authorizationIndicator | Indicates whether the authorization was a pre-authorization or final authorization. Applicable to Mastercard only. Use pre for initial authorizations, for example, prior to tips. Use final for final authorizations, for example, including tips. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
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. |
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. |
Charge a Tokenized Credit Card
Use this method to authorize and capture a payment using a tokenized credit card number issued by a certified token provider. The payment processor must support payment network tokenization, and you must pass in your request the token, the expiration date, and the cryptogram receied from the token provider.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "C1E3I6",
"avsResultCode": "Y",
"cvvResultCode": "S",
"cavvResultCode": "9",
"transId": "2149186775",
"refTransID": "",
"transHash": "C85B15CED28462974F1114DB07A16C39",
"accountNumber": "XXXX0015",
"accountType": "Mastercard",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"userFields": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
],
"networkTransId": "123456789NNNH"
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency.Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , DKK , NOK , PLN , SEK , EUR , AUD , and NZD . |
String, three characters. |
payment | This element contains payment information. |
|
creditCard | Contains tokenized credit card information. |
|
cardNumber | Required. The token issued by the token provider. Use the token as decrypted from the cryptogram. Do not use the physical card's account number. |
Numeric string, 13-16 digits. |
expirationDate | Required. The token's expiration date. Use the expiration date as decrypted from the cryptogram. Do not use the physical card's expiration date. |
|
isPaymentToken | A flag to Indicate that the payment uses a payment network token. Set to true if the cardNumber is a token. |
Boolean. Either true or false . |
cryptogram | Required. The cryptogram received from the token provider. Include the cryptogram to verify that the transaction is tokenized. |
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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 | Important: This field is deprecated and should not be used. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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. Important: This field is deprecated and should not be used. 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 Visa Secure or Mastercard Identity Check. 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 type2 -- unattended terminal3 -- self-service terminal4 -- electronic cash register5 -- personal computer based terminal7 -- wireless POS8 -- website9 -- dial terminal10 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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. |
processingOptions | Contains details for additional transaction processing. Required if the merchant stores card-on-file payment information. |
|
isFirstRecurringPayment | Indicates the initial zero-dollar authorization or the first recurring payment in a series of charges. Required if the merchant stores card-on-file payment information. Set recurringBilling to true if you set isFirstRecurringPayment . |
Boolean. |
isFirstSubsequentAuth | Indicates the initial zero-dollar authorization or the first payment in a series of charges. Required if the merchant stores card-on-file payment information. |
Boolean. |
isSubsequentAuth | Indicates that the transaction is a follow-on transaction for an established customer. Use in these situations:
Required if the merchant stores card-on-file payment information. |
Boolean. |
isStoredCredentials | Indicates that the transaction was initiated by the customer using card-on-file payment information. Required if the merchant stores card-on-file payment information. |
Boolean. |
subsequentAuthInformation | Contains details for subsequent authorizations using stored payment information. Required if the merchant stores card-on-file payment information. |
|
originalNetworkTransId | Required. The network transaction ID returned in response to the original card-on-file transaction. Store the networkTransId value received in the original card-on-file transaction response. Set the originalNetworkTransId to the original networkTransId value for all subsequent authorizations against the same card-on-file. |
String, up to 255 characters. |
reason | Required. Describes the reason for the subsequent card-on-file transaction. Use resubmission for resubmitting the original charge if declined, and if the customer has already received goods or services.Use delayedCharge if there are supplemental charges after the original charge was submitted and the customer has received the goods or services.Use reauthorization for new transactions submitted after the original transaction, for example, for split or delayed shipments of goods, or for extended services beyond those originally requested.Use noShow for penalties after cancellation of services, for example, when a customer does not appear after making a reservation. |
String. Either resubmission , delayedCharge , reauthorization , or noShow . |
originalAuthAmount | Required. The original authorization amount. Store the amount of the original card-on-file transaction response. Set the originalAuthAmount to the original amount value for all subsequent authorizations against the same card-on-file. |
Decimal, up to 15 digits with a decimal point. Required for Discover, Diners Club, JCB, and China Union Pay transactions. Do not use currency symbols. |
authorizationIndicator | Indicates whether the authorization was a pre-authorization or final authorization. Applicable to Mastercard only. Use pre for initial authorizations, for example, prior to tips. Use final for final authorizations, for example, including tips. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
authCode | The authorization code granted by the card issuing bank for this transaction. |
String, up to 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. Important: 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 | Deprecated. Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. Superseded by transHashSha2 . |
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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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, up to 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
transHashSha2 | The SHA-512 hash returned in transaction responses, which you can use to confirm that the transaction response came from Authorize.net. See the Transaction Hash Upgrade Guide<\/a> for details on how to use transHashSha2<\/code>. |
String. |
Mobile In-App Transactions
Enables you to pass Accept Mobile, Apple Pay, or Google Pay payment data to Authorize.net. For more information about in-app payment transactions, see the Mobile In-App developer guide.
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.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "2768NO",
"avsResultCode": "Y",
"cvvResultCode": "P",
"cavvResultCode": "2",
"transId": "60006537898",
"refTransID": "",
"transHash": "B3BDC21A6B341938D8F1927492F4D516",
"accountNumber": "XXXX0005",
"accountType": "AmericanExpress",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"userFields": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
],
"transHashSha2": ""
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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 type2 -- unattended terminal3 -- self-service terminal4 -- electronic cash register5 -- personal computer based terminal7 -- wireless POS8 -- website9 -- dial terminal10 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
authorizationIndicator | Indicates whether the authorization is for the final transaction amount. Applies to Mastercard transactions only. Use final if the amount of the transaction is final.Use pre if the amount of the transaction is not final. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- 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. Important: 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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
Create a Google Pay Transaction
Use this function to create an Authorize.net payment transaction request using Google Pay data in place of card data.
{
"transactionResponse": {
"responseCode": "1",
"authCode": "2768NO",
"avsResultCode": "Y",
"cvvResultCode": "P",
"cavvResultCode": "2",
"transId": "60006537898",
"refTransID": "",
"transHash": "B3BDC21A6B341938D8F1927492F4D516",
"accountNumber": "XXXX0005",
"accountType": "AmericanExpress",
"messages": [
{
"code": "1",
"description": "This transaction has been approved."
}
],
"userFields": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
],
"transHashSha2": ""
},
"refId": "123456",
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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.GOOGLE.INAPP.PAYMENT for Google 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. Worldpay RAFT 610 merchants can view the invoice number in the Worldpay Reporting Portal. |
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. |
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. |
|
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 | Country of customer’s billing address. |
|
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
authorizationIndicator | Indicates whether the authorization is for the final transaction amount. Applies to Mastercard transactions only. Use final if the amount of the transaction is final.Use pre if the amount of the transaction is not final. |
String. Either pre or final . |
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 -- Approved2 -- Declined3 -- Error4 -- 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. Important: 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. |
description | 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 -- Approved2 -- Declined3 -- Error4 -- 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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
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 developer guide.
Important: 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.
{
"transactionResponse": {
"responseCode": "5",
"rawResponseCode": "0",
"transId": "2149186954",
"refTransID": "",
"transHash": "A719785EE9752530FDCE67695E9A56EE",
"accountType": "PayPal",
"messages": [
{
"code": "2000",
"description": "Need payer consent."
}
],
"secureAcceptance": {
"SecureAcceptanceUrl": "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-C506B0LGTG2J800OK"
}
},
"messages": {
"resultCode": "Ok",
"message": [
{
"code": "I00001",
"text": "Successful."
}
]
}
}
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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , EUR , and AUD . |
String, three characters. |
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 -- CanadaDE -- Germany ES -- SpainFR -- FranceGB -- United KingdomIT -- ItalyUS -- 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. |
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 . |
shipTo | This element contains 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. |
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. 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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
rawResponseCode | Contains the specific error code returned by PayPal. This field is set to 0 for an approved 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. |
transHash | Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. |
String. |
accountType | The account type used for the transaction. |
String. The value for PayPal transactions is payPal . |
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. For example, I00001 or E00001 . |
description | Text explanation of the code for the result. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
secureAcceptance | This element contains Secure Acceptance information. |
|
secureAcceptanceUrl | Contains the URL to a payment form that can accept payment details in a secure fashion. You should redirect the customer's browser to this URL, so that the customer can log in, provide payment details, and initiate payment processing. This URL has a token appended to it that is valid for up to three hours. In Test Mode, the URL will be returned with an invalid token of 0. |
String. A valid and well-formed URL. For example, http://www.paypal.com/cgibin/webscr?cmd=_express-checkout&token=0. |
Authorization and Capture
This type of transaction is the most common and is the default payment gateway transaction type. Like the Authorization Only request, it notifies PayPal that an Authorization and Capture transaction has been initiated, but does not complete the request. It also 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.
{
"transactionResponse": {
"responseCode": "3",
"rawResponseCode": "0",
"transId": "0",
"refTransID": "",
"transHash": "2AF9B654FE7745AF78EBF7A8DD8A18D2",
"accountType": "PayPal",
"errors": [
{
"errorCode": "2001",
"errorText": "PayPal transactions are not accepted by this merchant."
}
]
},
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
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 | 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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , EUR , and AUD . |
String, three characters. |
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 -- CanadaDE -- Germany ES -- SpainFR -- FranceGB -- United KingdomIT -- ItalyUS -- 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. |
shipTo | This element contains 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. |
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. 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 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
rawResponseCode | Contains the specific error code returned by PayPal. This field is set to 0 for an approved 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. |
transHash | Payment gateway-generated MD5 hash value that can be used to authenticate the transaction response. |
String. |
accountType | The account type used for the transaction. |
String. The value for PayPal transactions is payPal . |
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. For example, I00001 or E00001 . |
description | Text explanation of the code for the result. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
secureAcceptance | This element is a container. |
|
secureAcceptanceUrl | Contains the URL to a payment form that can accept payment details in a secure fashion. You should redirect the customer's browser to this URL, so that the customer can log in, provide payment details, and initiate payment processing. This URL has a token appended to it that is valid for up to three hours. In Test Mode, the URL will be returned with an invalid token of 0. |
String. A valid and well-formed URL. For example, http://www.paypal.com/cgibin/webscr?cmd=_express-checkout&token=0. |
Get Details
A Get Details transaction returns customer’s PayPal Payer ID and shipping information. Get Details can be called at any time and is most useful after the customer has approved the payment at PayPal.
{
"transactionResponse": {
"responseCode": "3",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "0",
"refTransID": "128",
"transHash": "B349AC0DCCCF601C6DB09403341CD18F",
"accountNumber": "",
"accountType": "",
"errors": [
{
"errorCode": "16",
"errorText": "The transaction cannot be found."
}
],
"shipTo": {}
},
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
This sample PHP code demonstrates how to perform this function using our PHP SDK.
This sample C# code demonstrates how to perform this function using our .NET SDK.
This sample Java code demonstrates how to perform this function using our Java SDK.
This sample Ruby code demonstrates how to perform this function using our Ruby SDK.
This sample Python code demonstrates how to perform this function using our Python SDK.
This sample JavaScript code demonstrates how to perform this function using our Node.js SDK.
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 | This element is a container for transaction specific information. |
|
transactionType |
|
String. Use getDetailsTransaction to authorize and automatically capture the transaction. |
refTransId | The ID of the original transaction from which you are pulling the Payer ID and shipping information. |
Numeric 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. For example, I00001 or E00001 . |
text | Text explanation of the code for the result. |
String. |
transactionResponse | The overall status of the transaction. | |
rawResponseCode | Contains the specific error code returned by PayPal. This field is set to 0 for an approved 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. |
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. |
accountType | The account type used for the transaction. |
String. The value for PayPal transactions is payPal . |
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. For example, I00001 or E00001 . |
description | Text explanation of the code for the result. |
String. |
shipTo | This element contains 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. |
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. |
|
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. |
secureAcceptance | Contains information about secure acceptance. |
|
PayerID | Contains the Payer ID of the customer, returned by PayPal. This is returned only if the customer has visited the PayPal payment form using the URL returned in the SecureAcceptanceUrl field of the authOnlyTransaction response, and logged in. Otherwise, this field will not be returned. |
String. |
Authorization Only, Continued
This request, if successful, actually authorizes the transaction but does not capture it.
{
"transactionResponse": {
"responseCode": "3",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "0",
"refTransID": "128",
"transHash": "B349AC0DCCCF601C6DB09403341CD18F",
"accountNumber": "",
"accountType": "",
"errors": [
{
"errorCode": "16",
"errorText": "The transaction cannot be found."
}
],
"shipTo": {}
},
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
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 | This element is a container for transaction specific information. |
|
transactionType | String. Use authOnlyContinueTransaction to authorize and automatically capture the transaction. |
|
amount | Optional. Updated 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 |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , EUR , and AUD . |
String, three characters. |
payment | This element contains payment information. |
|
payPal | This element is a container for PayPal information. |
|
payerID | The payerID value returned in the GetDetailsTransaction response, or the value passed to the merchant's success/cancel URL server by PayPal as a web parameter |
|
refTransId | The value of transId returned from the original authOnlyTransaction call. |
Numeric 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. |
Prior Authorization Capture
This transaction type is used to capture an Authorization Only, Continued transaction that was successfully authorized through the payment gateway.
{
"transactionResponse": {
"responseCode": "3",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "0",
"refTransID": "128",
"transHash": "B349AC0DCCCF601C6DB09403341CD18F",
"accountNumber": "",
"accountType": "",
"errors": [
{
"errorCode": "16",
"errorText": "The transaction cannot be found."
}
],
"shipTo": {}
},
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
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 | 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. |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , EUR , and AUD . |
String, three characters. |
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 -- CanadaDE -- Germany ES -- SpainFR -- FranceGB -- United KingdomIT -- ItalyUS -- 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. |
|
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. |
|
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. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
refTransID | The value of transId returned from the original authOnlyTransaction call. |
Numeric 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. For example, I00001 or E00001 . |
text | Text explanation of the code for the result. |
String. |
transactionResponse | Contains information about a specific transaction. |
|
responseCode | The overall status of the transaction. |
String. One of the following: 1 -- Approved2 -- Declined3 -- Error4 -- Held for Review |
rawResponseCode | Contains the specific error code returned by PayPal. This field is set to 0 for an approved 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. |
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. |
accountType | The account type used for the transaction. |
String. The value for PayPal transactions is payPal . |
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. For example, I00001 or E00001 . |
description | Text explanation of the code for the result. |
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. Worldpay RAFT 610 merchants can view the first two userField elements in the Worldpay Reporting Portal. |
|
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. |
Authorization and Capture, Continued
This request actually authorizes and captures the transaction.
{
"transactionResponse": {
"responseCode": "3",
"authCode": "",
"avsResultCode": "P",
"cvvResultCode": "",
"cavvResultCode": "",
"transId": "0",
"refTransID": "139",
"transHash": "B349AC0DCCCF601C6DB09403341CD18F",
"accountNumber": "",
"accountType": "",
"errors": [
{
"errorCode": "16",
"errorText": "The transaction cannot be found."
}
],
"shipTo": {}
},
"messages": {
"resultCode": "Error",
"message": [
{
"code": "E00027",
"text": "The transaction was unsuccessful."
}
]
}
}
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 | This element is a container for transaction specific information. |
|
transactionType | The transaction type. |
String. Use authCaptureContinueTransaction to complete the original authCaptureTransaction request. |
amount | Optional. Updated 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 |
currencyCode | Required. Currency of the transaction. Use the ISO 4217 three-letter alphabetic code for the currency. Currently supported currencies are USD , CAD , GBP , EUR , and AUD . |
String, three characters. |
payment | This element contains payment information. |
|
payPal | This element is a container for PayPal information. |
|
payerID | The payer identification value returned in the GetDetailsTransaction response, or the value passed to the merchant's success/cancel URL server by PayPal as a web parameter |
|
refTransId | The value of transId returned from the original authOnlyTransaction call. |
Numeric 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. |