|
Search documentation: |
Help Advanced | |
Published 05/13/2002 |
![]() ![]() ![]() ![]() |
Chapter 2
XML Report Formats
This chapter describes the format of CyberSource XML reports. See Appendix A, "XML Report DTDs" for the document type definitions (DTDs) for XML reports.
XML Conventions
This chapter uses the following conventions to describe the syntax of each XML element:
<Sample Attribute=CDATA> (Element) (ChoiceOne) | (ChoiceTwo) (ComplexElement) (OptionalElement)? (RequiredRecurringElement)+ (OptionalRecurringElement)* </Sample>Table 2 Conventions for XML SyntaxData Types and Lengths
This chapter uses the following terms to refer to the data type of each field:
- Alphanumeric: String containing letters, numbers, and special characters (for example,
@
,#
, and%
). All text uses UTF-8 character encoding.- Boolean: Single character;
T
for true orF
for false.- Currency: Amount, including a decimal point if necessary.
- Date:
YYYY
-
MM
-
DD
, where:- DateTime:
YYYY
-
MM
-
DD
T
HH
:
MM
:
SS
[
+
|
-
]
HH
:
MM
, where:
YYYY
is the four-digit year.MM
is the two-digit month.DD
is the two-digit day.T
HH
:
MM
:
SS
is the time , withHH
representing hours,MM
representing minutes, andSS
representing seconds.[
+
|
-
]
HH
:
MM
is the time zone's offset from Greenwich Mean Time (GMT), withHH
representing hours andMM
representing minutes. The number is prefixed by either a plus (+
) or minus (-
) to indicate whether the offset adds to or subtracts from GMT.
- For example, the offset for Pacific Daylight Time is
-07:00
.- Numeric: String containing numbers.
The data lengths indicate the maximum length of each field.
Payment Batch Detail Report
The Payment Batch Detail Report contains transactions that include any of the following CyberSource applications:
The report includes only transactions that CyberSource has sent to the payment processor.
Note Transactions appear in the Payment Batch Detail Report before funds are transferred to or from your merchant bank account. To determine whether funds have been transferred, you must reconcile the Payment Batch Detail Report with your bank statements.
For more information about reconciling transactions, see the ICS2 Developer's Guide and the Payment Services Planning Guide. Both guides are available on the CyberSource Support Center.
<Report>
The
<Report>
element is the root element of the report.Syntax
<Report Name=CDATA Version=NMTOKEN xmlns=CDATA MerchantID=CDATA ReportStartDate=CDATA ReportEndDate=CDATA> (Batches) </Report>Table 3 Attributes of <Report>Table 4 Child Elements of <Report>
Element Name Description<Batches>
Payment batches that are included in the report. See <Batches> for a list of child elements.<Report Name="Payment Batch Detail" Version="1.0" xmlns="http://reports.ic3.com/reports/pbdr/1.0" MerchantID="sample" ReportStartDate="2001-06-25T07:00:00-07:00" ReportEndDate="2001-06-26T07:00:00-07:00"> <Batches> ... </Batches> </Report><Batches>
The
<Batches>
element contains all of the payment batches that are included in the report.Syntax
<Batches> (Batch)* </Batches>Table 5 Child Elements of <Batches>
Element Name Description<Batch>
Requests associated with a payment batch. See <Batch> for a list of child elements and attributes.<Batches> <Batch BatchID="10101" BatchDate="2001-08-15"> ... </Batch> </Batches><Batch>
The
<Batch>
element contains the requests associated with a payment batch. The element's attributes provide information about the payment batch.Syntax
<Batch BatchID=CDATA BatchDate=CDATA> (Requests) </Batch>Table 6 Attributes of <Batch>
Attribute Name Description Data Type and LengthBatchID
CyberSource batch in which the transaction was sent. Numeric (39)BatchDate
Date when the batch was sent to the processor. Date (10)<Batch BatchID="10101" BatchDate="2001-08-15"> <Requests> ... </Requests> </Batch><Requests>
The
<Requests>
element contains all of the requests from a payment batch.Syntax
<Requests> (Request)* </Requests>Table 7 Child Elements of <Requests>
Element Name Description<Request>
Information about a payment transaction. See <Request> for a list of child elements and attributes.<Requests> <Request RequestID="0062929390000167905114" MerchantReferenceNumber="58EA07517FE5A71C016884DCB"> ... </Request> </Requests><Request>
The
<Request>
element contains information about a payment transaction.Syntax
<Request RequestID=CDATA MerchantReferenceNumber=CDATA> (TransactionReferenceNumber) (PaymentMethod) (CurrencyCode) (Amount) (Application) </Request>Table 8 Attributes of <Request>Table 9 Child Elements of <Request>
Element Name Description Data Type and Length<TransactionReferenceNumber>
Reference number that you use to reconcile your CyberSource reports with your processor reports. Alphanumeric (60)<PaymentMethod>
Type of card or bank account used for the transaction. This field can contain one of the following values:
American Express
Carte Blanche
Checking
Corporate Checking
Diners Club
Discover
EnRoute
JAL
JCB
MasterCard
MBNA-LOAN
Savings
Switch
UNKNOWN card
Visa
If your company uses CyberSource to process a private label card, this field can also contain the name of your private label card. Alphanumeric (50)<CurrencyCode>
ISO currency code used for the transaction.For a list of ISO currency codes, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Alphanumeric (5)<Amount>
Amount of the transaction. Currency (19)<Application>
CyberSource payment application processed for the transaction. Alphanumeric (50)<Request RequestID="0062929390000167905114" MerchantReferenceNumber="58EA07517FE5A71C016884DCB"> <TransactionReferenceNumber>SJZPTM07Y8O5</TransactionReferenceNumber> <PaymentMethod>Visa</PaymentMethod> <CurrencyCode>USD</CurrencyCode> <Amount>100.00</Amount> <Application>ics_bill</Application> </Request>Transaction Detail Report
This report contains summary information about your transactions. It also includes detailed information about your payment and Advanced Fraud Screen transactions.
<Report>
The
<Report>
element is the root element of the report.Syntax
<Report MerchantID=CDATA Name=CDATA ReportStartDate=CDATA ReportEndDate=CDATA Version=CDATA xmlns=CDATA> (Requests) </Report>Table 10 Attributes of <Report>Table 11 Child Elements of <Report>
Element Name Description<Requests>
Contains all of the requests in the report. See <Requests> for a list of child elements.<Report MerchantID="CyberSource" Name="Transaction Detail" ReportStartDate="2001-08-16T08:00:00-08:00" ReportEndDate="2001-08-17T08:00:00-08:00" Version="1.0" xmlns="http://reports.ic3.com/reports/pbdr/1.0"> <Requests> ... </Requests> </Report><Requests>
The
<Requests>
element contains all of the requests in the report.Syntax
<Requests> (Request)* </Requests>Table 12 Child Elements of <Requests>
Element Name Description<Request>
Information about a single request. See <Request> for a list of child elements and attributes.<Requests> <Request MerchantReferenceNumber="3C515C71D48F631" RequestDate="2001-08-16T09:42:03-08:00" RequestID="0004223530000167905139"> ... </Request> </Requests><Request>
The
<Request>
element contains information about a single request.Note A request can include multiple CyberSource applications.
Syntax
<Request MerchantReferenceNumber=CDATA RequestDate=CDATA RequestID=CDATA> (BillTo) (ShipTo)? (Shipping)? (PaymentMethod) (LineItems)? (ApplicationReplies) (PaymentData)? (RiskData)? </Request>Table 13 Attributes of <Request>Table 14 Child Elements of <Request>
Element Name Description<BillTo>
Information about the billing address and purchaser for the order. See <BillTo> for a list of child elements.<ShipTo>
Information about the shipping address and recipient for the order. See <ShipTo> for a list of child elements.<Shipping>
Information about the shipping method and shipping carrier for the order. See <Shipping> for a list of child elements.<PaymentMethod>
Information about the payment method for the order. See <PaymentMethod> for a list of child elements.<LineItems>
Line items for the order. See <LineItems> for a list of child elements.<ApplicationReplies>
Reply information for all applications in the request. See <ApplicationReplies> for a list of child elements.<PaymentData>
Detailed information about the result of a payment transaction. See <PaymentData> for a list of child elements.<RiskData>
Detailed information about the result of a risk transaction. See <RiskData> for a list of child elements.<Request MerchantReferenceNumber="3C515C71D48F631" RequestDate="2001-08-16T09:42:03-08:00" RequestID="0004223530000167905139"> <BillTo> ... </BillTo> <ShipTo> ... </ShipTo> <Shipping> ... </Shipping> <PaymentMethod> ... </PaymentMethod> <LineItems> ... </LineItems> <ApplicationReplies> ... </ApplicationReplies> <PaymentData> ... </PaymentData> <RiskData> ... </RiskData> </Request><BillTo>
The
<BillTo>
element contains information about the billing address and purchaser for the order.Syntax
<BillTo> (FirstName) (LastName) (MiddleName)? (NameSuffix)? (Address1)? (Address2)? (City) (State)? (Zip)? (CompanyName)? (Email) (Country) (Title)? (Phone) (IPAddress)? (HostName)? (UserName)? </BillTo>Table 15 Child Elements of <BillTo>
Element Name Description Data Type and Length<FirstName>
First name of the bill-to customer. Alphanumeric (60)<LastName>
Last name of the bill-to customer. Alphanumeric (60)<MiddleName>
Middle name of the bill-to customer. Alphanumeric (60)<NameSuffix>
Suffix of the bill-to customer's name. Alphanumeric (60)<Address1>
First line of the billing address. Alphanumeric (60)<Address2>
Second line of the billing address. Alphanumeric (60)<City>
City of the billing address. Alphanumeric (50)<State>
State, province, or territory of the billing address. Alphanumeric (20)<Zip>
Postal code of the billing address. Alphanumeric (10)<CompanyName>
Company name of the billing address. Alphanumeric (60)<Email>
Email address of the bill-to customer. Alphanumeric (255)<Country>
ISO country code of the billing address.For a list of ISO country codes, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Alphanumeric (2)<Title>
Title of the bill-to customer. Alphanumeric (30)<Phone>
Phone number of the bill-to customer. Alphanumeric (15)<IPAddress>
IP address of the bill-to customer. Alphanumeric (15)<HostName>
DNS-resolved hostname from the customer's IP address. Alphanumeric (255)<UserName>
Reserved for future use. Alphanumeric (50)<BillTo> <FirstName>John</FirstName> <LastName>Doe</LastName> <Address1>1295 Charleston Rd.</Address1> <City>Mountain View</City> <State>CA</State> <Zip>94043</Zip> <Email>icsinfo@cybersource.com</Email> <Country>US</Country> <Phone>650-965-6000</Phone> <IPAddress>127.0.0.1</IPAddress> </BillTo><ShipTo>
The
<ShipTo>
element contains information about the shipping address and recipient for the order.Syntax
<ShipTo> (FirstName)? (LastName)? (Address1)? (Address2)? (City)? (State)? (Zip)? (CompanyName)? (Country)? (Phone)? </ShipTo>Table 16 Child Elements of <ShipTo>
Element Name Description Data Type and Length<FirstName>
First name of the ship-to customer. Alphanumeric (60)<LastName>
Last name of the ship-to customer. Alphanumeric (60)<Address1>
First line of the shipping address. Alphanumeric (60)<Address2>
Second line of the shipping address. Alphanumeric (60)<City>
City of the shipping address. Alphanumeric (60)<State>
State, province, or territory of the shipping address. Alphanumeric (50)<Zip>
Postal code of the shipping address. Alphanumeric (10)<CompanyName>
Company name of the shipping address. Alphanumeric (60)<Country>
ISO country code of the shipping address.For a list of ISO country codes, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Alphanumeric (2)<Phone>
Phone number of the ship-to customer. Alphanumeric (15)<ShipTo> <Address1>1295 Charleston Rd.</Address1> <City>Mountain View</City> <State>CA</State> <Zip>94043</Zip> <Country>US</Country> </ShipTo><Shipping>
The
<Shipping>
element contains information about the shipping method and shipping carrier for the order.Syntax
<Shipping> (Method) (Carrier) </Shipping>Table 17 Child Elements of <Shipping>
Element Name Description Data Type and Length<Method>
Reserved for future use. Alphanumeric (10)<Carrier>
Reserved for future use. Alphanumeric (12)<Shipping> <Method /> <Carrier /> </Shipping><PaymentMethod>
The
<PaymentMethod>
element contains information about the payment method for the order.If a credit card was used for the order, or if no payment method was specified, the
<PaymentMethod>
element will contain a<Card>
element. If an electronic check was used for the order, the<PaymentMethod>
element will contain a<Check>
element.Syntax
<PaymentMethod> (Card) | (Check) </PaymentMethod>Table 18 Child Elements of <PaymentMethod>
Element Name Description<Card>
Information used to process a credit card. See <Card> for a list of child elements.<Check>
Information used to process an electronic check. See <Check> for a list of child elements.Example
<PaymentMethod>
Element<PaymentMethod> <Card> ... </Card> </PaymentMethod><Card>
The
<Card>
element contains information used to process a credit card.For requests that do not include payment information, all child elements of
<Card>
will be empty.Syntax
<Card> (AccountSuffix) (ExpirationMonth) (ExpirationYear) (StartMonth)? (StartYear)? (IssueNumber)? (CardType)? </Card>Table 19 Child Elements of <Card><Card> <AccountSuffix>1111</AccountSuffix> <ExpirationMonth>12</ExpirationMonth> <ExpirationYear>2015</ExpirationYear> <CardType>Visa</CardType> </Card><Check>
The
<Check>
element contains information used to process an electronic check.Syntax
<Check> (AccountSuffix) (CheckNumber) </Check>Table 20 Child Elements of <Check>
Element Name Description Data Type and Length<AccountSuffix>
Last four digits of the customer's bank account number. Alphanumeric (4)<CheckNumber>
Reserved for future use. Alphanumeric (10)<Check> <AccountSuffix>1111</AccountSuffix> </Check><LineItems>
The
<LineItems>
element contains all of the line items for the order.Note In the ICS2 API, line items are referred to as offers.
Syntax
<LineItems> (LineItem)* </LineItems>Table 21 Child Elements of <LineItems>
Element Name Description<LineItem>
Information about a single line item in an order. See <LineItem> for a list of child elements and attributes.The following example includes two separate line items.
<LineItems> <LineItem Number="0"> ... </LineItem> <LineItem Number="1"> ... </LineItem> </LineItems><LineItem>
The
<LineItem>
element contains information about a single line item in an order.Note In the ICS2 API, line items are referred to as offers.
Syntax
<LineItem Number=CDATA> (FulfillmentType) (Quantity)? (UnitPrice) (TaxAmount)? (MerchantProductSKU)? (ProductName)? (ProductCode)? </LineItem>Table 22 Attributes of <LineItem>
Attribute Name Description Data Type and LengthNumber
Number of the line item. For the first line item, the value of this attribute is0
. Numeric (10)Table 23 Child Elements of <LineItem>
Element Name Description Data Type and Length<FulfillmentType>
Information about the product code used for the line item. This element can contain one of the following values: Alphanumeric (2)<Quantity>
Quantity of the product being purchased. Numeric (10)<UnitPrice>
Per-item price of the product. Currency (19)<TaxAmount>
Tax amount associated with this item. Currency (19)<MerchantProductSKU>
Product identifier code. Alphanumeric (20)<ProductName>
Name of the product. Alphanumeric (20)<ProductCode>
Type of product that the offer contains.For detailed information about this field, see the ICS2 Developer's Guide. For a list of product codes used by the ics_tax application, see the Taxware Product Code User Guide. Both documents are available on the CyberSource Support Center. Alphanumeric (30)<LineItem Number="0"> <FulfillmentType>P</FulfillmentType> <Quantity>1</Quantity> <UnitPrice>20.00</UnitPrice> </LineItem><ApplicationReplies>
The
<ApplicationReplies>
element contains reply information for all applications in the request.Syntax
<ApplicationReplies> (ApplicationReply)+ </ApplicationReplies>Table 24 Child Elements of <ApplicationReplies>
Element Name Description<ApplicationReply>
Reply information for a single CyberSource application. See <ApplicationReply> for a list of child elements and attributes.Example
<ApplicationReplies>
ElementThe following example shows replies for a request that included the ics_auth and ics_score applications.
<ApplicationReplies> <ApplicationReply Name="ics_auth"> ... </ApplicationReply> <ApplicationReply Name="ics_score"> ... </ApplicationReply> </ApplicationReplies><ApplicationReply>
The
<ApplicationReply>
element contains reply information for a single CyberSource application. The report includes an<ApplicationReply>
element for each application in your request.If one application in a request is declined, it can prevent other applications in the request from being run. You will receive an
<ApplicationReply>
element for each application that does not run; however, its child elements will be empty.Syntax
<ApplicationReply Name=CDATA> (RCode) (RFlag) (RMsg) </ApplicationReply>Table 25 Attributes of <ApplicationReply>
Attribute Name Description Data Type and LengthName
Name of the CyberSource application whose reply is described in this element. Alphanumeric (30)Table 26 Child Elements of <ApplicationReply>Example
<ApplicationReply>
Element For a Successful Reply<ApplicationReply Name="ics_score"> <RCode>1</RCode> <RFlag>SOK</RFlag> <RMsg>score service was successful</RMsg> </ApplicationReply>Example
<ApplicationReply>
Element For an Application That Did Not RunThis example shows an application that did not run because another application in the request failed. See <ApplicationReply> for more information.
<ApplicationReply Name="ics_auth"> <RCode /> <RFlag /> <RMsg /> </ApplicationReply><PaymentData>
The
<PaymentData>
element contains detailed information about the result of a payment transaction.Syntax
<PaymentData> (PaymentRequestID) (PaymentProcessor) (Amount) (CurrencyCode) (TotalTaxAmount)? (AuthorizationType)? (AuthorizationCode)? (AVSResult)? (AVSResultMapped)? (CVResult)? (ProcessorResponseCode)? </PaymentData>Table 27 Child Elements of <PaymentData>
Element Name Description Data Type and Length<PaymentRequestID>
Original request ID for the purchase.For authorizations and standalone credits, this element contains the request ID for the transaction.For settlements, this element contains the request ID for the corresponding authorization. Numeric (26)<PaymentProcessor>
Payment processor used for the transaction. This element can contain one of the following values: Alphanumeric (40)<Amount>
Total amount of the authorization, settlement, debit, or credit. Currency (19)<CurrencyCode>
Currency used for the transaction. Alphanumeric (5)<TotalTaxAmount>
Total tax amount for all of the line items in the transaction. Currency (19)<AuthorizationType>
Type of authorization. This element can contain one of the following values:
O
: Online authorization. You receive this value for any successful authorization that was settled normally or was not settled at all.V
: Verbal authorization. You receive this value if an authorization was settled by providing a verbal authorization code.If the authorization was not successful, or if the processor did not return an authorization code, this element is empty. Alphanumeric (1)<AuthorizationCode>
Authorization code. Alphanumeric (15)<AVSResult>
Address verification result code returned directly from the processor. Alphanumeric (10)<AVSResultMapped>
CyberSource standardized result of address verification. For a list of possible values, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Alphanumeric (5)<CVResult>
Results of processing the card verification number. For a list of possible values, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Alphanumeric (1)<ProcessorResponseCode>
Response code returned directly from the processor. Alphanumeric (60)<PaymentData> <PaymentRequestID>9935369793074590426287</PaymentRequestID> <PaymentProcessor>smartfdc</PaymentProcessor> <Amount>20.00</Amount> <CurrencyCode>USD</CurrencyCode> <AuthorizationType>O</AuthorizationType> <AuthorizationCode>123456</AuthorizationCode> <AVSResult>YYY</AVSResult> <AVSResultMapped>Y</AVSResultMapped> <CVResult>M</CVResult> <ProcessorResponseCode>A</ProcessorResponseCode> </PaymentData><RiskData>
The
<RiskData>
element contains detailed information about the result of a risk transaction.If you use Smart Authorization, some reply fields for the ics_auth application are returned as children of the
<RiskData>
element.Syntax
<RiskData> (Factors)? (HostSeverity)? (Score)? (TimeLocal)? (ConsumerPasswordProvided)? (LostPassword)? (RepeatCustomer)? (CookiesAccepted)? (ConsumerLoyalty)? (ConsumerPromotions)? (GiftWrap)? (ReturnsAccepted)? (ProductRisk)? (AppliedThreshold)? (AppliedTimeHedge) (AppliedVelocityHedge) (AppliedHostHedge) (AppliedCategoryGift) (AppliedCategoryTime) (AppliedAVS)? (AppliedCV)? </RiskData>Table 28 Child Elements of <RiskData>
Element Name Description Data Type and Length<Factors>
Comma-separated list of codes that indicate what factors affected the score of the order.For a list of factor codes, see the ICS2 Developer's Guide, available on the CyberSource Support Center.Note If you use Smart Authorization, the value of the reply field auth_factor_code is returned in this field. Alphanumeric (100)<HostSeverity>
Indicates the risk associated with the customer's email domain. Numeric (5)<Score>
Total score calculated for the order. Numeric (5)<TimeLocal>
The customer's local time, which is calculated from the transaction request time and the customer's billing address. DateTime (25)<ConsumerPasswordProvided>
Reserved for future use. Boolean (1)<LostPassword>
Reserved for future use. Boolean (1)<RepeatCustomer>
Reserved for future use. Boolean (1)<CookiesAccepted>
Reserved for future use. Boolean (1)<ConsumerLoyalty>
Reserved for future use. Boolean (1)<ConsumerPromotions>
Reserved for future use. Boolean (1)<GiftWrap>
Reserved for future use. Boolean (1)<ReturnsAccepted>
Reserved for future use. Boolean (1)<ProductRisk>
Reserved for future use. Alphanumeric (6)<AppliedThreshold>
Score threshold applied to the order.Note For information about how ics_score selects a threshold, see the ICS2 Developer's Guide, available on the CyberSource Support Center. Numeric (5)<AppliedTimeHedge>
Importance of time of day in assessing the order. If you do not specify a value in your request, the server uses the default value for your merchant ID. Alphanumeric (6)<AppliedVelocityHedge>
Importance of the number of orders from the customer in a specific time period in assessing the order. If you do not specify a value in your request, the server uses the default value for your merchant ID. Alphanumeric (6)<AppliedHostHedge>
Importance of email and IP addresses of the customer in assessing the order. If you do not specify a value in your request, the server uses the default value for your merchant ID. Alphanumeric (6)<AppliedCategoryGift>
Importance of bill-to and ship-to addresses in assessing the order. If you do not specify a value in your request, the server uses the default value for your merchant ID. Alphanumeric (1)<AppliedCategoryTime>
Importance of time of day in assessing the order. If you do not specify a value in your request, the server uses the default value for your merchant ID. Alphanumeric (6)<AppliedAVS>
Reserved for future use. Alphanumeric (5)<AppliedCV>
Reserved for future use. Alphanumeric (1)<RiskData> <Factors>G,U</Factors> <HostSeverity>3</HostSeverity> <Score>17</Score> <AppliedThreshold>50</AppliedThreshold> <AppliedTimeHedge>Normal</AppliedTimeHedge> <AppliedVelocityHedge>Normal</AppliedVelocityHedge> <AppliedHostHedge>Normal</AppliedHostHedge> <AppliedCategoryGift>No</AppliedCategoryGift> <AppliedCategoryTime>Normal</AppliedCategoryTime> </RiskData>
Copyright © 2002 CyberSource Corporation. |
![]() |
![]() |
![]() |
![]() |