Visa Checkout SO API
Visa Checkout SO API
Developer Guide
© 2022. Cybersource Corporation. All rights reserved.
Cybersource Corporation (Cybersource) furnishes this document and the software described in this document under
the applicable agreement between the reader of this document (You) and Cybersource (Agreement). You may use this
document and/or software only in accordance with the terms of the Agreement. Except as expressly set forth in the
Agreement, the information contained in this document is subject to change without notice and therefore should not be
interpreted in any way as a guarantee or warranty by Cybersource. Cybersource assumes no responsibility or liability
for any errors that may appear in this document. The copyrighted software that accompanies this document is licensed
to You for use only in strict accordance with the Agreement. You should read the Agreement carefully before using the
software. Except as permitted by the Agreement, You may not reproduce any part of this document, store this document
in a retrieval system, or transmit this document, in any form or by any means, electronic, mechanical, recording, or
otherwise, without the prior written consent of Cybersource.
For Government or defense agencies: Use, duplication, or disclosure by the Government or defense agencies is subject to
restrictions as set forth the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in similar
clauses in the FAR and NASA FAR Supplement.
For civilian agencies: Use, reproduction, or disclosure is subject to restrictions set forth in subparagraphs (a) through (d)
of the Commercial Computer Software Restricted Rights clause at 52.227-19 and the limitations set forth in Cybersource
Corporation's standard commercial agreement for this software. Unpublished rights reserved under the copyright laws of
the United States.
Trademarks
Authorize.Net, eCheck.Net, and The Power of Payment are registered trademarks of Cybersource Corporation.
Cybersource, Cybersource Payment Manager, Cybersource Risk Manager, Cybersource Decision Manager, and
Cybersource Connect are trademarks and/or service marks of Cybersource Corporation. Visa, Visa International,
Cybersource, the Visa logo, the Cybersource logo, and 3-D Secure are the registered trademarks of Visa International in
the United States and other countries. All other trademarks, service marks, registered marks, or registered service marks
are the property of their respective owners.
Version: 22.02
22.02
Added a link to the test card numbers to Testing 3D Secure 2.x with Visa Click to Pay
(on page 10).
22.01
Added examples for Authorization, Capture, Credit, and Authorization Reversal.
21.02
Updated Using 3D Secure with Visa Click to Pay (on page 9).
Added Testing 3D Secure 2.x with Visa Click to Pay (on page 10).
21.01
Changed the name of Visa Checkout to Visa Click to Pay.
Updated Supported Countries, Regions, and Payment Currencies (on page 32).
19.04
Updated the enrollment URL. See Visa Click to Pay Documents (on page 6).
Updated countries, regions, and currencies. See Supported Countries, Regions, and
Payment Currencies (on page 32).
19.03
Updated the XML request example. See Visa Click to Pay Data Request (on page 28).
Added the vcReply_newUser response field. See vcReply_newUser (on page 23).
Implementing Cybersource services requires software development skills. You must write code that
uses the API request and response fields to integrate the Cybersource services into your existing
order management system.
• Code examples
Related Documentation
Cybersource Documents
• Getting Started with Cybersource Advanced for the Simple Order API (PDF | HTML)
• Credit Card Services Using the Simple Order API (PDF | HTML)
http://www.cybersource.com/support_center/support_documentation
http://www.cybersource.com/locations
You can also obtain these documents by signing up for a Visa Click to Pay developer account:
https://developer.visa.com/#enroll
Customer Support
For support information about any Cybersource service, visit the Support Center:
http://www.cybersource.com/support
Requirements
• You must have a Visa Click to Pay merchant account. If you do not already have a Visa Click
to Pay merchant account, contact your local Cybersource sales representative: http://
www.cybersource.com/locations
• You must have a Cybersource account. If you do not already have a Cybersource account,
contact your local Cybersource sales representative.
• You must contact Cybersource Customer Support to have your account configured for Visa Click
to Pay.
• When you use the Simple Order API in XML format, you must use version 1.105 or later of the
XML schema.
• You must be familiar with the Cybersource credit card services as described in Credit Card
Services Using the Simple Order API. .
• If you are including payer authentication in your Visa Click to Pay implementation, you
must be familiar with the Cybersource payer authentication services as described in Payer
Authentication Using the Simple Order API. .
Supported Countries
For a list of the countries and associated currencies from which you can accept Visa Click to Pay
payments, refer to Supported Countries, Regions, and Payment Currencies (on page 32).
Visa Click to Pay | Integrating Visa Click to Pay into Your System | 7
1. You send data to Visa Click to Pay to display the Visa Click to Pay button on your checkout page.
For details about this step, contact your Cybersource sales representative and consult Getting
Started with Visa Click to Pay (published by Visa). To obtain this document, see Visa Click to
Pay Documents (on page 6).
2. You retrieve the Visa Click to Pay payment data so that you can display it to your customer.
However, you cannot retrieve the PAN unless your account is configured for it. See Getting Visa
Click to Pay Data (on page 8). The primary account number (PAN) is not required in order
to process a Visa Click to Pay transaction.
◦ ccAuthService_run
◦ merchantID
◦ merchantReferenceCode
◦ paymentSolution
◦ purchaseTotals_currency
◦ vc_orderID
For descriptions of these fields, see Credit Card Services Using the Simple Order API.
4. Cybersource obtains payment data from Visa Click to Pay and includes it in the authorization
request that is sent to the processor.
5. For follow-on transactions such as full authorization reversal, capture, and credit, you must
include the following fields in your request in addition to the required fields documented in
Credit Card Services Using the Simple Order API.
◦ paymentSolution
◦ vc_orderID
The Visa Checkout data service enables you to receive the decrypted Visa Click to Pay data in the
response message. However, you cannot retrieve the PAN unless your account is configured for it. You
can use the retrieved data to help the customer confirm the purchase.
Visa Click to Pay | Integrating Visa Click to Pay into Your System | 8
• Descriptions of these required request fields
◦ getVisaCheckoutDataService_run
◦ merchantID
◦ merchantReferenceCode
◦ paymentSolution
◦ vc_orderID
For Visa Click to Pay, Cybersource supports the following kinds of payer authentication:
• Visa Secure
When you implement 3D Secure 2.x with Visa Click to Pay, you must integrate the Cardinal Cruise
Direct API version of Payer Authentication as described in the Payer Authentication Using the Simple
Order API and include the following fields:
Visa Click to Pay | Integrating Visa Click to Pay into Your System | 9
• paymentSolution –set to visacheckout
Contact customer support to configure your account to support this integration to ensure the correct
StepUpURL fields are returned by payer authentication. If you have previously on-boarded with 3D
Secure 1 or 3D Secure 2.x Hybrid or Standard Payer Authentication methods you will still need to
contact customer support.
Important: With Visa Click to Pay, you must include the payer authentication enrollment
service payerAuthEnrollService and the credit card authorization service ccAuthService
in the same request message in order to decrypt the primary account number (PAN)
and complete the rest of the payer authentication flow. When you submit a separate
request message for each service, the payer authentication enrollment service
payerAuthEnrollService request fails.
Visa Secure
For Visa Click to Pay transactions, do not map the Visa Secure data from the decrypt Visa Click to Pay
data service response message to the payer authentication fields in the authorization request. The
data is mapped for you. The transaction information that is sent to the processor includes the Visa
Secure data.
Get test card numbers from the Payer Authentication developer guide in the Testing Payer
Authentication section. See the Test Cases for 3-D Secure 2.x section in the Payer Authentication
developer guide here.
Important: Only the Visa test card numbers listed for the 3-D Secure 2.x test cases in the
Payer Authentication developer guide are configured for Visa Click to Pay. Other test card
types will not work.
Use the Visa card number specified in the test with the card’s expiration date set to the month
of January and the current year plus three. For example, for 2022, use 2025. You also need the
minimum required fields for an order. Be sure to remove spaces in card numbers when testing.
The XID values are included in 3D Secure 2.x test cases for legacy reasons.
Visa Click to Pay | Integrating Visa Click to Pay into Your System | 10
While the 3D Secure version and directory server transaction ID fields are returned for the Check
Enrollment and Validate Authentication services, this data is not included in the 3D Secure 2.x test
cases.
• Device fingerprint
• True IP address
Visa Click to Pay | Integrating Visa Click to Pay into Your System | 11
API Fields
Formatting Restrictions
Do not use the following characters: < > $ % ^ * _ = [ ] \ { } | ; ~ ` Using these characters may result in
data validation errors.
For more information about these data types, see the World Wide Web Consortium (W3C) XML
Schema Part 2: Datatypes Second Edition.
where:
Request Fields
Request Fields
Field Description Used By: Data Type
Required (R) & Length
or Optional (O)
getVisaCheckoutDa Whether to include getVisaCheckout String (5)
taService_run getVisaCheckoutDataService in DataService (R)
your request. Possible values:
vc_orderID Identifier for the Visa Click to Pay getVisaCheckout String (48)
order. Visa Click to Pay provides DataService (R)
a unique order ID for every
transaction in the Visa Click to Pay
callID field.
• Numbers
• Letters
Response Fields
Visa Click to Pay returns all decrypted data to you, except the PAN, unless your account is configured
to receive it. The purpose of the fields in the Visa Click to Pay encrypted payment data is to pass
information from Visa Click to Pay to the processor. Consequently, many decrypted fields and values
might not be useful to you.
Response Fields
Field Description Data Type
& Length
billTo_city Decrypted city in the billing address. String
(100)
billTo_county Name of the municipality. This value is common String (80)
for addresses in Mexico.
billTo_country Decrypted country in the billing address. For the String (2)
possible values, see ISO Standard Country Codes.
• ACCEPT
• ERROR
• REJECT
• FAILED
• NOT_VERIFIED
• VERIFIED
shipTo_city Decrypted city of the shipping address. String
(100)
shipTo_country Decrypted country of the shipping address. For the String (2)
possible values, see ISO Standard Country Codes.
shipTo_default Status of the default shipping address. Determines String (5)
whether it is flagged as the default shipping
address by the customer. Possible values:
• CREDIT
• DEBIT
• DEBIT/CREDIT
vcReply_cardLastName Customer’s last name as printed on the card. String
(256)
vcReply_cardType Decrypted card type. Possible values: String (10)
• DISCOVER
• MASTERCARD
• VISA
vcReply_cardVerificationS Decrypted verification status for the card. Possible String (12)
tatus values:
• FAILED
• NOT_VERIFIED
• VERIFIED
vcReply_creationTimeSt Decrypted time stamp for the creation of the Visa String (20)
amp Click to Pay order. Format: Unix time, which is also
called epoch time.
vcReply_customData_#_n Name for the name-value pair of custom data String
ame values that you define. You can define up to 100 (1024 for
Visa Click to Pay custom data name-value pairs tothe
include in encrypted payment data. Use this field to
name-va
specify the name for the name-value pair. lue pair;
the
Format: vcReply_customData_#_name=name of combined
field name
where # equals the number of the name-value pair and value
(0 through 99) and name equals the name for the fields)
name-value pair.
Examples:
vcReply_customData_0_name=lastname
vcReply_customData_1_name=firstname
vcReply_customData_2_name=company
Examples:
vcReply_customData_0_value=Smith
vcReply_customData_1_value=Jane
getVisaCheckoutDataService_run=true
merchantID=Foster_City_Flowers
merchantReferenceCode=123456
paymentSolution=visacheckout
vc_orderID=335161017227386762
XML Examples
Visa Click to Pay Data Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.105">
<merchantID>Foster_City_Flowers</merchantID>
<merchantReferenceCode>123456</merchantReferenceCode>
<paymentSolution>visacheckout</paymentSolution>
<vc>
<orderID>335161017227386762</orderID>
<c:replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.105">
<c:merchantReferenceCode>123456</c:merchantReferenceCode>
<c:requestID>4067382331040172491847</c:requestID>
<c:decision>ACCEPT</c:decision>
<c:reasonCode>100</c:reasonCode>
<c:purchaseTotals><c:currency>USD</c:currency></c:purchaseTotals>
<c:shipTo>
<c:street1>100 Main Street</c:street1>
<c:street2>Suite 1234</c:street2>
<c:city>Foster City</c:city>
<c:state>CA</c:state>
<c:postalCode>94404</c:postalCode>
<c:country>US</c:country>
<c:phoneNumber>6501234567</c:phoneNumber>
<c:name>Jane Smith</c:name>
<c:id>jz0l2LMWLobl8IEcNuSBj0J9uO2zSsNx1ETZGjPI</c:id>
<c:addressVerificationStatus>VERIFIED</c:addressVerificationStatus>
</c:shipTo>
<c:billTo>
<c:street1>100 Main Street</c:street1>
<c:street2>Suite 1234</c:street2>
<c:city>Foster City</c:city>
<c:state>CA</c:state>
<c:postalCode>94404</c:postalCode>
<c:country>US</c:country>
<c:phoneNumber>6501234567</c:phoneNumber>
<c:name>Jane Smith</c:name>
<c:/billTo>
<c:card>
<c:accountNumber>4111111111111111</c:accountNumber>
<c:expirationMonth>09</c:expirationMonth>
<c:expirationYear>2018</c:expirationYear>
<c:suffix>1111</c:suffix>
<c:prefix>987654</c:prefix>
</c:card>
<c:vcReply>
<c:creationTimeStamp>1406568920102<c:creationTimeStamp>
<c:alternateShippingAddressCountryCode>US</c:alternateShippingAddressCountryCode>
<c:alternateShippingAddressPostalCode>94404</c:alternateShippingAddressPostalCo
de>
<c:vcAccountEncryptedID>nIPl7vnm6EZLiPMqn1DKX48B8GzXDY</c:vcAccountEncryptedID>
<c:vcAccountEmail>[email protected]</c:vcAccountEmail>
<c:merchantReferenceID>Order12345</c:merchantReferenceID>
<c:subtotalAmount>10</c:subtotalAmount>
<c:shippingHandlingAmount>2</c:shippingHandlingAmount>
<c:taxAmount>1</c:taxAmount>
<c:discountAmount>1</c:discountAmount>
<c:giftWrapAmount>2</c:giftWrapAmount>
<c:uncategorizedAmount>2</c:uncategorizedAmount>
<c:totalPurchaseAmount>16</c:totalPurchaseAmount>
<c:walletReferenceID>2kd94lcjksf04vcoqasdpde90trk</c:walletReferenceID>
<c:promotionCode>SUMMER SALE 123</c:promotionCode>
<c:paymentInstrumentID>XNLbQ16j8hxholOGUDPYDTqRgdWpb3kbk</c:paymentInstrumentID>
<c:cardVerificationStatus>VERIFIED</c:cardVerificationStatus>
<c:issuerID>null</c:issuerID>
<c:paymentInstrumentNickName>Business Credit
Card</c:paymentInstrumentNickName>
<c:nameOnCard>Jane Smith</c:nameOnCard>
<c:cardType>VISA</c:cardType>
<c:cardGroup>CREDIT</c:cardGroup>
<c:cardArt id="0">
<c:fileName>https://secure.checkout.com/CardArt/uWOvgFoQISxPh.png</c:fileName>
<c:height>105</c:height>
<c:width>164</c:width>
</c:cardArt>
<c:riskAdvice>LOW</c:riskAdvice>
<c:riskScore>0</c:riskScore>
<c:avsCodeRaw>Y</c:avsCodeRaw>
<c:cvnCodeRaw>M</c:cvnCodeRaw>
</c:vcReply>
<c:getVisaCheckoutDataReply>
<c:reasonCode>100</c:reasonCode>
</c:getVisaCheckoutDataReply>
</c:replyMessage>
Important: Because Cybersource can add response fields and reason codes at any time:
• You must parse the response data according to the names of the fields instead of the
field order in the response. For more information about parsing response fields, see
the documentation for your client.
• Your error handler should be able to process new reason codes without problems.
• Your error handler should use the decision field to determine the result if it receives a
reason code that it does not recognize.
Reason Codes
Reason Description
Code
100 Successful transaction.
150 General system failure.