One of the new features included in protocol 3 is the Basket XML field.
This field offers greater customisation of the current basket field that is sent in the transaction registration post.
What has changed?
The original basket field that is sent through to Sage Pay is simply a text field that enables you to detail the items that are purchased through your business along with totals and overall cost.
In its current state, the total for the basket field does not need to match the actual amount of the transaction that is being processed.
Although passing the information in the basket field is a helpful tool, having it separate from the actual transaction amount can cause confusion in some cases.
The Basket XML allows you to pass the same information you would with the standard basket field however the total in the Basket XML must match the amount the transaction is being processed for.
This gives you greater control when processing the transaction, and offers more accuracy when passing through the items and individual costs that make up the total for your transaction.
The basket XML can now also be seen on the PayPal payment pages. Older versions of the basket field were not displayed by PayPal when a transaction was processed. The use of the basket XML allows your customers to view the basket on the PayPal payment pages.
Alongside this you are also able to include more information with the transaction by using the basket XML.
What is included in the Basket XML?
The Basket XML field builds on the existing basket functionality while adding more features for you.
The information captured in the XML is :-
Unit net amount
Unit tax amount
Unit gross amount
Each element can be passed for each item that is purchased through your website. An example of the basket XML as it is passed through to Sage Pay with TRIP data included is :-
What is TRIP data?
TRIP data enables businesses to pass through additional information for their customers that is appended to the Basket XML.
Information such as –
Check in date
Check out date
Number in party
Can all be captured along with the normal details of the order and submitted along with the transaction.
TRIP data is used primarily by businesses in the travel industry however the application of TRIP data can be used in other scenarios.
For example, if your business hires items, or sells tickets you can use TRIP data to capture more information on the customer that can be used alongside our additional fraud prevention tools to reduce risk.
Only 1 element of TRIP data can be sent with each transaction that is processed through the Sage Pay system.
If you want to pass more than 1 element of trip data you will need to process more than 1 transaction in order to do so.
Why should I use basket XML?
If you want to increase the level of information passed with each transaction, and make sure your basket field will always match the value of the transaction Basket XML is for you.
The basket XML is an improved version of the current field passed with your transactions. By upgrading to protocol 3 you are able to get the best out of your integration with Sage Pay.
How do I use the Basket XML?
If you want to use the basket XML in your transactions you will need to upgrade your current protocol version to 3.00.
You can then add the basket XML field to your transaction registration post when processing a transaction.
More information on the basket XML, and how to add this to your transactions can be found in our protocol and integration guides.