What are the New Cart Purchase Parameters?

It has become necessary for 2CO to know the specific product that is being sold at the time of sale and for that product’s description to be stored in our database for reference. This change is required both by 2CO and by our banking partners to better mitigate risk and to monitor items being sold. Because of this requirement, we are asking cart makers and/or users to make changes to their cart or programs so that additional information about the items being sold is passed to 2CO.

It is very important to note that:

  1. All previous parameters remain supported and should continue to be passed in (2CO, Authorize.net),
  2. The parameter total (or the authorize.net parameter : x_amount) passed in for the order will continue to be the amount billed for the sale,
  3. The paramaters cart_order_id and sid (or the authorize.net parameters: x_invoice_num and x_login) are still manditory with this parameter set.

REQUIRED PARAMETERS
These parameters are required to identify cart products being purchased and should be supplied ASAP.

For some clients it may make sense to create 1 or multiple generic products in the 2CO db, like “Premium Hosting”, “Super Saver Hosting” and pass in a total for the sale as generated on their site. If this option works for you please make the product name reasonably descriptive, (i.e. “website design services” would be a good description, “web services” a poor one for the same item ).

  • c_prod or c_prod_[:digit] : This parameter will contain either the assigned_product_id given to the product upon creation in the 2CO system or a vendor specified id. It may, optionally, also contain the id followed by a ‘,’ (ASCII comma) followed by an integer which will represent the quantity. This parameter should not be autogenerated with each individual sale but should be tied to a specific product. The c_prod value should match whatever external vendor id is recorded in the 2CO system. The external vendor id may be a cart assigned product id or the vendors own internal product id as long as the value matches the value stored in the 2Co system. Examples of valid values:
    • 1
    • my_product_17
    • product_5,3
  • id_type This parameter will contain an integer value representing the type
    or classification of the ids used in the c_prod parameter(s). This value will
    apply universally per transaction. That is to say c_prod parameters must contain
    only assigned_product_id values or only vendor_product_id values. Current
    valid values for this parameter are defined as follows.
    • 1 is defined as vendor_product_id
    • 2 is defined as assigned_product_id
    • 3 - 0 are reserved for future use.

OPTIONAL PARAMETERS
These parameters are intended for carts that retain no product database or as a transition method of populating the 2CO database. Although it is desirable to receive as many parameters as possible with the purchase the option of creating products on the fly should only be used when no other options exist.

  • sh_cost (optional) : This parameter will contain shipping and handling cost, if any. The sh_cost parameter is completely optional. This parameter has the same format rules as the parameter containing the total (total or x_amount) that you are currently using. This value received is assumed to be in the selected currency of your 2CO account.
    Examples of valid values: 0.50, 5.00, 10
  • c_name or c_name_[:digit] : This parameter is required for product information to be displayed at checkout. The value of this parameter should contain the name of the product to be created. It is limited to 128 characters including spaces and punctuation. If the value is too long it will be cut off at 128 characters.
  • c_description or c_description_[:digit] : This parameter is required for product information to be displayed at checkout. The value of this parameter should contain a short description of the product to be sold. It is limited to 255 characters including spaces and punctuation. If the value is too long this value will be stored as the long description instead. The long description will not show on the checkout pages but it will be saved in the 2Co product database.
  • c_price or c_price_[:digit] : This parameter is required for product information to be displayed at checkout. This value should reflect the price of the product in your 2CO account selected currency. This parameter has the follow format restrictions
    • Numbers and decimal point only.
    • Max value: 999999.99
  • c_tangible or c_tangible_[:digit] (optional) : This parameter is optional. If you do not provide a value for it a default value of Y will be used. This field indicates if the product is a physical product or an e-good/service.
    This parameter has the following format restrictions: Valid values: y Y n N

NEW PARAMETERS IN PRACTICE
Below you will find an example form that shows how these new parameters might be implemented:

<form action="https://www.2checkout.com/2co/buyer/purchase" method="post">

	<input type="hidden" name="id_type" value="1">
	<input type="hidden" name="c_prod_1" value="QAWSZX0678,3">
	<input type="hidden" name="c_name_1" value="Sample 	Product">
	<input type="hidden" name="c_description_1" value="Sample Product Description">
	<input type="hidden" name="c_price_1" value="5.00">
	<input type="hidden" name="c_tangible_1" value="N">

	<input type="hidden" name="c_prod_2" value="CABLE0029,1">
	<input type="hidden" name="c_name_2" value="A Second Sample Product">
	<input type="hidden" name="c_description_2" value="This Products Description">
	<input type="hidden" name="c_price_2" value="10.00">
	<input type="hidden" name="c_tangible_2" value="N">

	<input type="hidden" name="sid" value="XXXXXX">
	<input type="hidden" name="cart_order_id" value="050304-102658-3874">
	<input type="hidden" name="total" value="25.00">

	<input type="submit">
</form>

Please note that you will need to replace the sample values with your own.

How can I make a view cart link?

You can easily make a link that allows customers to get back to their cart from your website by using the link below.

> https://www.2checkout.com/2co/buyer/purchase?sid=XXXXXX

Note: Be sure to replace “XXXXXX” with your numerical seller identification number.

What are the parameters for 2CO’s Plug and Play cart?

Below are the parameters supported by the Plug and Play Cart. These parameters can only be used if you have added your products to the 2CO database. You are using the Plug and Play cart if you are passing in the three parameters listed under the Required section below.

Multi-page Payment Routine:
https://www.2checkout.com/2co/buyer/purchase
Supports all payment methods. Supports tangible and intangible products/services.

Single Page Payment Routine:
https://www.2checkout.com/checkout/spurchase
Credit card-only payment routine only available for intangible products/services.

Required Parameters:
sid - Your 2checkout vendor account number (64 characters max)
product_id - The 2CO ID for the product or service in the 2Checkout database
quantity - The Quantity of the product (99 max value)

Additional Parameters:
demo - Y to enable demo mode, do not pass this in for live sales
fixed - Y to remove the Continue Shopping button and lock the quantity fields
lang - “sp” for Spanish purchase routine pages, defaults to English if this is absent, but “en” may be used for English as well.
return_url - used to control where the Continue Shopping button will send the customer when clicked (255 characters max)
merchant_order_id - Specify your order number with this parameter. It will also be included in the confirmation emails to yourself and the customer. (50 characters max)
pay_method - CC for Credit Card, CK for check, PPI for PayPal, PPL for PayPal Pay Later, or FXS for FXSource. This will set the default selection on the payment method step during the checkout process.
skip_landing - If set to 1 it will skip the order review page of the purchase routine. If there are options on the products it will cause an error and redirect the customer back to the order review page.

To populate the billing information page you may pass in:
card_holder_name - Card holder’s name. (128 characters max)

The card holder’s name can also be populated using the first_name, middle_initial, and last_name parameters. IMPORTANT: If you use these three parameters, the data will be combined into and returned as card_holder_name to your Approved URL script.

street_address - Card holder’s street address (64 characters max)
street_address2 - The second line for the street address, typically suburb or apartment number information (64 characters max)
city - Card holder’s city (64 characters max)
state - Card holder’s state (64 characters max)
zip - Card holder’s zip (16 characters max)
country - Card holder’s country (64 characters max)
email - Card holder’s email address (64 characters max)
phone - Card holder’s phone number (16 characters max)
phone_extension - Card holder’s phone extension (9 characters max)

To populate the shipping information page you may pass in:
ship_name
ship_street_address
ship_street_address2
ship_city
ship_state
ship_zip
ship_country

Please note that shipping information will only be collected for items that are defined as tangible in our system. Shipping is also only charged for tangible items. We will ask for shipping information if you pass in any of the shipping parameters, regardless of whether the item is tangible or not. This does not mean we will apply shipping charges to the sale, but their information will be collected.

The billing information page will also be populated with the information from the shipping page if the shipping information is collected on that sale and the billing information is not passed in.

Custom Parameters:
You may pass in any additional parameters that you may need and they will be returned to you at the end of the sale. The only restrictions on custom parameters are that they can not share the name of ANY parameter that our system uses, even from the other sets. Please note that you WILL need a return script set up on the Look and Feel page to receive any of these parameters back as they are not included in the confirmation emails.

Passing Multiple Plug and Play Products:
You may also pass multiple plug and play products in one form. To do this add a corresponding digit to the quantity and product_id parameters to group them for each product. For example, if we wanted to pass two products into the system we would be passing in first the sid parameter, then product_id1 and quantity1, and then product_id2 and quantity2.

Example:

<form action='https://www.2checkout.com/2co/buyer/purchase' method='post'>
<input type='hidden' name='sid' value='123' >
<input type='hidden' name='quantity1' value='1' >
<input type='hidden' name='product_id1' value='1008' />
<input type='hidden' name='quantity2' value='1' >
<input type='hidden' name='product_id2' value='1014' >
<input type='hidden' name='quantity3' value='1' >
<input type='hidden' name='product_id3' value='1011' >
<input name="submit" type='submit' value='Buy from 2CO' >
</form>

You can receive back all of the parameters that were passed in as well as the following parameters:
order_number - 2Checkout.com order number
total - the total amount of the purchase
ship_method - the shipping method that was selected for this order (if applicable)
credit_card_processed - Y if successful (Approved), K if waiting for approval (Pending)
merchant_product_id - your product ID for purchased item
key - the MD5 hash that can be used to verify that the sale came from one of our servers

Also note that this is the only parameter set that can be used for recurring billing with our service.

Important: You can not mix the three parameter sets. This will cause problems during payment or may prevent the payment pages from working at all.

Related Article: Country Codes

Do I Need a Shopping Cart?

No, you do not need to use a shopping cart to integrate with 2CO.

All that is required is an HTML link. We provide sample code snippets for each of your products that can be easily incorporated into your site.

See a demonstration here: acmeonlinebooks.com

Can I Use a Shopping Cart?

Yes, you can use a shopping cart in conjunction with 2CO’s features.

Shopping cart functionality already exists on 2CheckOut as a basic option. All you have to do is place “buy” and “checkout” links on your site.

See a demonstration here:

http://acmeonlinebooks.com/

Our service can also be incorporated into almost any shopping cart that supports authorize.net parameters.

Can I Use a Shopping Cart With 2Checkout?

Shopping cart functionality exists, and is already running, on 2CheckOut. All you have to do is place “buy” and “checkout” links on your site.
See Demo Here: acmeonlinebooks.com

Our gateway can also be incorporated into almost any shopping cart that supports the authorize.net gateway.

Recent Posts from the Community:

calculation

posted by: everfresh

Reserve Release

posted by: vaisal
More from the community »

Spotlight Supplier

Spotlight Supplier

Vacation Rental Software

Spotlight Product

Spotlight Product

Visualizer Photo FX


Popular Tags