Do you have an example XML I would use with my credentials for a sale transaction in the sandbox and live?
Do you have an example XML I would use with my credentials for a sale transaction in the sandbox and live?
Hi Steve,
If you are coding directly using the cnpAPI, you can find XML examples in Chapter 3 of the cnpAPI Reference Guide (Worldpay cnpAPI Reference Guide API 12.7 V2.2 ). While the guide does not cover all possible permutation of the various transaction types, there's plenty in there you can use. Note: For the Sandbox, make sure you pick an Online example, since the Sandbox does not support Batch transactions.
Here is a Sale transaction example from the guide, with the L2/L3 elements removed.
<cnpOnlineRequest version="12.0" xmlns="http://www.vantivcnp.com/schema" merchantId="100">
<authentication>
<user>User Name</user>
<password>password</password>
</authentication>
<sale id="1" reportGroup="ABC Division" customerId="038945">
<orderId>5234234</orderId>
<amount>40000</amount>
<orderSource>3dsAuthenticated</orderSource>
<billToAddress>
<name>John Smith</name>
<addressLine1>100 Main St</addressLine1>
<addressLine2>100 Main St</addressLine2>
<addressLine3>100 Main St</addressLine3>
<city>Boston</city>
<state>MA</state>
<zip>12345</zip>
<country>US</country>
<email>jsmith@someaddress.com</email>
<phone>555-123-4567</phone>
</billToAddress>
<card>
<type>VI</type>
<number>4005550000081019</number>
<expDate>1210</expDate>
<cardValidationNum>555</cardValidationNum>
</card>
<cardholderAuthentication>
<authenticationValue>BwABBJQ1AgJDUCAAAAAAA=</authenticationValue>
<authenticationTransactionId>gMV75TAgk=</authenticationTransactionId>
</cardholderAuthentication>
<customBilling>
<phone>8888888888</phone>
<descriptor>bdi*Vantiv Test</descriptor>
</customBilling>
</sale>
</cnpOnlineRequest>
If you are using one of the SDKs, you can find examples on the github site in the section for the specific language you want to use.
Tom
Hi Steve,
If you are coding directly using the cnpAPI, you can find XML examples in Chapter 3 of the cnpAPI Reference Guide (Worldpay cnpAPI Reference Guide API 12.7 V2.2 ). While the guide does not cover all possible permutation of the various transaction types, there's plenty in there you can use. Note: For the Sandbox, make sure you pick an Online example, since the Sandbox does not support Batch transactions.
Here is a Sale transaction example from the guide, with the L2/L3 elements removed.
<cnpOnlineRequest version="12.0" xmlns="http://www.vantivcnp.com/schema" merchantId="100">
<authentication>
<user>User Name</user>
<password>password</password>
</authentication>
<sale id="1" reportGroup="ABC Division" customerId="038945">
<orderId>5234234</orderId>
<amount>40000</amount>
<orderSource>3dsAuthenticated</orderSource>
<billToAddress>
<name>John Smith</name>
<addressLine1>100 Main St</addressLine1>
<addressLine2>100 Main St</addressLine2>
<addressLine3>100 Main St</addressLine3>
<city>Boston</city>
<state>MA</state>
<zip>12345</zip>
<country>US</country>
<email>jsmith@someaddress.com</email>
<phone>555-123-4567</phone>
</billToAddress>
<card>
<type>VI</type>
<number>4005550000081019</number>
<expDate>1210</expDate>
<cardValidationNum>555</cardValidationNum>
</card>
<cardholderAuthentication>
<authenticationValue>BwABBJQ1AgJDUCAAAAAAA=</authenticationValue>
<authenticationTransactionId>gMV75TAgk=</authenticationTransactionId>
</cardholderAuthentication>
<customBilling>
<phone>8888888888</phone>
<descriptor>bdi*Vantiv Test</descriptor>
</customBilling>
</sale>
</cnpOnlineRequest>
If you are using one of the SDKs, you can find examples on the github site in the section for the specific language you want to use.
Tom