100% found this document useful (1 vote)
286 views6 pages

Cybersource API

1) The document explains how to save a customer's card details with Cybersource API to be used for future transactions without charging a fee. It outlines the request parameters, endpoint URL, and steps to create a merchant account to test transactions. 2) It provides details on generating a transaction key, downloading the WSDL file, and creating a request stub from the WSDL. Configuration details like specifying the merchant ID in properties files is also mentioned. 3) The steps to save a customer's card including required request parameters, sample values, and response are described. It also outlines how to retrieve a previously saved card by specifying parameters like the subscription ID and checking the response.

Uploaded by

Madhur Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
286 views6 pages

Cybersource API

1) The document explains how to save a customer's card details with Cybersource API to be used for future transactions without charging a fee. It outlines the request parameters, endpoint URL, and steps to create a merchant account to test transactions. 2) It provides details on generating a transaction key, downloading the WSDL file, and creating a request stub from the WSDL. Configuration details like specifying the merchant ID in properties files is also mentioned. 3) The steps to save a customer's card including required request parameters, sample values, and response are described. It also outlines how to retrieve a previously saved card by specifying parameters like the subscription ID and checking the response.

Uploaded by

Madhur Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CybersourceAPIdocumentation

Feature:Saving/Retrievingthecustomercardforfuturetransactions.
ThisdocumentwillexplaintherequiredRequestparametersandtheendpointurlformakingaSOAPcallto
CybersourceAPItocreateandsavethecustomerprofileandcarddetails(withoutchargingafee)thatcanbe
retrievedlaterforfuturetransactions.
>>CybersourceTestBusinessCentersteps:
Url:https://ebctest.cybersource.com/ebctest/login/
WeneedtocreateaCybersourcemerchantaccounttotestoutourtransactionsandretrievea MerchantIDand
TransactionKey.AftercreatinganaccountandobtainingtheMerchantID(assignedautomaticallytoanewly
createdaccount),thestepstocreatetheTransactionKeyareasfollows:
1. ClickonTransactionSecurityKeysoptionunderAccountManagementtab.

2. SelectSecurityKeysfortheSOAPToolkitAPIoptionasweareusingSOAPtoolkitAPI.

3. ClickonGenerateKey

>>CreatingtheSTUBfromcybersourcewsdlfile.
WehavetocreatethestubfromtheCybersourcewsdlfilewhichwedownloadedfromthebelowurl.Thewsdlfile
isCyberSourceTransaction_1.121.wsdl.
Thewsdlcanbedownloadedfromtheurl:
https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.123.wsdl
#Note:TheJAVAclasses(stub)formwsdlcanbegeneratedbyfollowingthisstep
RightClickonanyProject>CreateNewOther>WebServices>WebServiceClient>Thenpastethewsdlurl(or
location)inServiceDefinition>Next>Finish
#Note: Incybs.propertiesfile,wehavetomentiontheMerchantID,DirectoryofthekeyandFilenameofthe
transactionkeyinmerchantID,keysDirectoryandkeyFilenamepropertiesrespectively.
#Note: WehavetofirstraiseaticketinCybersourceBusinessCentersupportsectiontoenabletheRecurring
Billing Subscriptionservice on themerchant IDyouare usingfrom their support center tosave/ retrieve the
customerprofiledetails.OtherwiseitwillthrowanErrorcode150.
>>Savingthecustomercard/profileonCybersource
1.EndPointCybersourceAPIURL:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor
2.Creatingacustomerprofilefirstrequirestoauthorizethecardusedforthetransaction.Tovalidate/authorizethe
customeraccount,followingRequestMessagefieldsneedstobesettothecorrespondingvalues:
RequestMessageParameters

SampleValues

paySubscriptionCreateService_run

true(String)

ccAuthService_run

true(String)

purchaseTotals_grandTotalAmount

0.00(String)

3.Aftersettingthefieldsforauthorizingthecustomer'scard,thefollowingRequestMessagefieldsneedstobeset
tothecorrespondingvalues:
RequestMessageParameters

SampleValues

billTo_firstName

John
(String)

billTo_lastName

Doe(String)

billTo_city

MountainView(String)

billTo_country

US(String)

billTo_email

[email protected](String)

billTo_postalCode

94043(String)

billTo_state

CA(String)

billTo_street1

1295CharlestonRoad(String)

card_accountNumber

4111111111111111(String)

card_cardType

001(String)

card_expirationMonth

12(BigInteger)

card_expirationYear

2018(BigInteger)

merchantID

demoID(String)

merchantReferenceCode

1234(String)

purchaseTotals_currency

USD(String)

recurringSubscriptionInfo_frequency

ondemand(String)

4.Aftersettingalltherequiredparameters,theAPIendpointURLneedstobeinvokedtogettheReplyMessage
fromthetransaction.TheReasonCodeneedstobeofvalue100toindicateasuccessfultransaction.
SampleReplyforasuccessfultransaction:
decision=ACCEPT
merchantReferenceCode=1234
paySubscriptionCreateReply_reasonCode=100
paySubscriptionCreateReply_subscriptionID=0000562489861111
purchaseTotals_currency=USD
reasonCode=100
requestID=3790672461500176056470
NOTE:The subscriptionID retrievedintheaboveresponsewillbeusedforretrievingthecustomerprofilefor
futuretransactionswheneverthecustomerwantstousethesamecardforthem.

5.XMLformatoftherequestmessagefortheabovetransactioncall:
<requestMessagexmlns="urn:schemascybersourcecom:transactiondata1.92">
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<street1>1295CharlestonRoad</street1>
<city>MountainView</city>
<state>CA</state>
<postalCode>94043</postalCode>
<country>US</country>
<email>[email protected]</email>
</billTo>
<purchaseTotals>
<currency>USD</currency>
</purchaseTotals>
<card>
<accountNumber>4111111111111111</accountNumber>
<expirationMonth>12</expirationMonth>
<expirationYear>2015</expirationYear>
<cardType>001</cardType>
</card>
<merchantID>demoID</merchantID>
<merchantReferenceCode>1234</merchantReferenceCode>
<recurringSubscriptionInfo>
<frequency>ondemand</frequency>
</recurringSubscriptionInfo>
<paySubscriptionCreateServicerun="true"/>
</requestMessage>
>>Retrievingthecustomercard/profilefromCybersource
1.EndPointCybersourceAPIURL:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor
2.ForretrievingthecustomerprofilefromCybersourceend,followingRequestMessagefieldsneedstobesetto
thecorrespondingvalues:
RequestMessageParameters

SampleValues

paySubscriptionRetrieveService_run

true(String)

merchantID

demoID(String)

merchantReferenceCode

1234(String)

recurringSubscriptionInfo_subscriptionID

subscriptionID(String)Retrievedfromthe
save card transaction response explained
above.

3.Aftersettingalltherequiredparameters,theAPIendpointURLneedstobeinvokedtogettheReplyMessage
fromthetransaction.ThisReplyMessagewillcontainthecustomerprofiledetailswhichcanberetrievedtomakea

futurepurchase.TheReasonCodeneedstobeofvalue100toindicateasuccessfultransaction.
SampleReplyforasuccessfultransaction:
merchantReferenceCode=1234
requestID=3790689247280176056442
decision=ACCEPT
reasonCode=100
paySubscriptionRetrieveReply_reasonCode=100
paySubscriptionRetrieveReply_cardAccountNumber=411111XXXXXX1111
paySubscriptionRetrieveReply_cardExpirationMonth=12
paySubscriptionRetrieveReply_cardExpirationYear=2018
paySubscriptionRetrieveReply_cardType=001
paySubscriptionRetrieveReply_city=MountainView
paySubscriptionRetrieveReply_country=US
paySubscriptionRetrieveReply_currency=USD
[email protected]
paySubscriptionRetrieveReply_firstName=JOHN
paySubscriptionRetrieveReply_frequency=ondemand
paySubscriptionRetrieveReply_lastName=DOE
paySubscriptionRetrieveReply_paymentMethod=creditcard
paySubscriptionRetrieveReply_postalCode=94043
paySubscriptionRetrieveReply_state=CA
paySubscriptionRetrieveReply_status=CURRENT
paySubscriptionRetrieveReply_street1=1295CharlestonRoad
paySubscriptionRetrieveReply_subscriptionID=0000562489861111
paySubscriptionRetrieveReply_ownerMerchantID=demoID
Theabovedetailscanbeusedtodisplayasavedcustomercardintheprofilesectionifuserwantstousethis
existingcardforfuturebillingandpurchase.
>>SearchingatransactioninCybersourceBusinessCenter
A transaction details can be searched in Cybersource Business center using the requestID returned from the
transactioncallasfollows:
1.ClickonGeneralSearchoptionunderTransactionSearchtab.Thefollowingscreenappearswhereyoucan
entertherequestIDtosearchthetransaction.

2.
The
followingtransactionresultscreenwillappearwherealltherelateddetailsarelisted.

You might also like