What are 2Checkout.com’s own parameters?

2CO has our own proprietary set of parameters that you can use if your cart supports them. If you would like to test your integration of these parameters, try using our developers.2Checkout area.

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

Single Page Payment Routine:
https://www.2checkout.com/checkout/spurchase
Only supports credit card payments and intangible products/services.

Required Parameters:
sid – Your 2Checkout vendor account number.
total – The total amount to be billed, in decimal form, without a currency symbol. (8 characters, decimal, 2 characters: Example: 99999999.99)
cart_order_id – A unique order id from your program. (128 characters max)

Product Identification Parameters:
Suppliers using this parameter set must pass in parameters to identify what is being sold during the purchase. These parameters will also benefit suppliers as when used correctly the product information will be displayed to customers on the purchase pages and will be listed on the suppliers 2Checkout.com sale detail page.

id_type – Due to changes in with the Product Identification parameters this parameter should be passed in once during the purchase and will need to have its value set to 1.
c_prod – The ID of the product that is being purchased. The quantity of product being purchased can passed with this parameter by placing a comma after the ID and then the quantity in numeric format.
c_name – The value of this parameter should contain the name of the product to be created. (128 characters max)
c_description – The value of this parameter should contain a short description of the product to be sold. (255 characters max)
c_price – The price of your product. Please note that in order to prevent a discrepancy between the total parameter and the sum of the product identification c_price parameters which may confuse the customer, the product price will not be displayed on the purchase page. (8 characters, decimal, 2 characters: Example: 99999999.99)

You can use these identification parameters to pass in multiple products as well. To do so you will need to append a digit to each parameter. For example, c_prod_1, c_name_1, c_description_1, c_price_1 will describe the first product, then to describe the second product you would use a 2 so the parameters will read c_prod_2, c_name_2 and so on.

Additional Parameters:
demo – Y to enable demo mode. Do not pass for live sales. Can also be controlled within the account.
lang – Chinese – zh, Danish – da, Dutch – nl, French – fr, German – gr, Greek – el, Italian – it, Japanese – jp, Norwegian – no, Portuguese – pt, Slovenian – sl, Spanish – es_ib, Spanish – es_la, Swedish – sv, defaults to English if this is absent, but en may be used for English as well.
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, AL for Acculynk PIN-debit, PPI for PayPal, or PPL for PayPal Pay Later. 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.
x_Receipt_Link_URL – Used to specify an approved URL on-the-fly, but is limited to the same domain that is used for your 2Checkout account, otherwise it will fail. This parameter will over-ride any URL set on the Look and Feel page. (no limit)

To pre 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 (64 characters max)
phone – Card holder’s phone (16 characters max)
phone_extension – Card holder’s phone extension (9 characters max)

To pre 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.

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.

You can receive back all of the parameters that were passed in as well as the following parameters:
order_number – 2Checkout.com order number
cart_order_id – Your cart ID number passed in.
credit_card_processed – Y if successful (Approved).
key – the MD5 hash used to verify that the sale came from one of our servers

Consult the documentation that came with your cart or contact the cart manufacturer for assistance with setting this up or to determine what URL you should enter on the Look and Feel page for your cart to receive the product information.

Recurring billing can not be done with this parameter set. You must use the Plug-N-Play parameter set and have the products defined within the 2CO database for recurring billing.

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.

Important Note: When you are testing parameters, please be certain to clear the cookies in your browser between tests to ensure the changes you have made are applied. For more information on clearing the cookies please click here.

Related Article: Country Codes

RSS feed

19 Comments »

# Comment by rudibela
2007-11-13 20:31:07

How are first_name, middle_initial, and last_name parameters combined into card_holder_name? Are they just concatenated or are they separated with space, underscore or any other character?

Thank you.

 
 
# Comment by joel 2CO Staff
2007-11-14 12:23:32

The parameters are combined with a space. For example:

first_name=”first”
middle_initial=”m”
last_name=”last”

These 3 parameters would be combined into:

card_holder_name=”first m last”

 
 
# Comment by thorsten
2008-08-29 10:19:38

credit_card_processed – Y if successful (Approved), K if waiting for approval (Pending)

1) What about other return states?
like canceled by user or error?

2) If it’s pending, how do I query the state until I get a final result, that I can display on my web site?

 
# Comment by joel 2CO Staff
2008-08-29 10:47:05

This parameter will always equal Y unless an online check was used. In that case the parameter would equal K. We will only send the customer back to your site if the credit card can be successfully authorized. If the card is declined the customer will stay on the 2Checkout page and see the error and have the option to attempt to authorize another credit card. If the customer cancels the transaction and closes the browser then no parameter will be posted back to your site.

If you wish to be notified of the status of a sale, for example the pending online check moving to a deposited status you can use our INS system. Documentation on the INS system can be found here. The message that deals with the status of an invoice changing will be the message you will want to use if your interested in being notified of the pending echeck moving to deposited.

 
 
 
# Comment by thorsten
2008-08-29 10:43:59

And how do I find out, which amount was paid?
It is possible on the payment site to remove items or the whole payment. So this may or may not be identical to the amount I sent in?

 
# Comment by joel 2CO Staff
2008-08-29 13:03:11

The total amount paid will be passed back to you as the “total” parameter. Keep in mind with this parameter set the total is based only off this parameter so your customers will not have the option to remove or edit the quantity of items on the 2Checkout page. Unless your customer manually edits the HTML POST or GET parameters this amount will always match what you sent in.

If you’re concerned someone may edit the total, in attempts to get your product without paying full price for it, you can implement the MD5 hash on your site. More information on this here. This hash is calculated using the total so if you store the total on your site before passing the customer to our purchase pages, you can calculate the hash and compare it with what we calculated. If they do not match then your system will know that the customer edited the total.

 
 
 
# Comment by bonier
2009-03-26 04:28:16

hi can we skip the billing and shipping information page? i’d like to handle this in my custom shipping cart when using 2checkout.

 
# Comment by joel 2CO Staff
2009-03-26 10:00:35

The 2Checkout shipping page will not appear when you are using this parameter set. You can collect and calculate shipping in your cart system. You will want to make sure that shipping cost is included in the Total that you send to the 2Checkout purcahse pages.

You will not be able to skip the billing address page but you can submit the customers information to us using the pre-population parameters described above so the customer does not need to enter their information in your cart and then again on our purchase pages. Customers must enter the billing details for their payment method on our pages and you cannot collect the credit card number in your shopping cart system.

 
 
 
# Comment by prabhu
2009-05-19 05:28:27

hi

i am trying to send multiple products from my page. please see the below coding

Here i am sending the values for two items, but in the “https://www.2checkout.com/2co/buyer/purchase” page, i am getting listed out only one project

please reply

 
 
# Comment by prabhu
2009-05-19 05:30:34

please tell me the coding for sending multiple products in ASP. i want them all to be displayed.

 
# Comment by joel 2CO Staff
2009-05-19 13:04:38

The “Creating 2Checkout Purchase Links” tutorial has some example code that you can review. You will want to look in the “Plug and Play Parameters” section under “Multiple Products in One Form” section.

If you have any further question you may want to submit a support ticket so you can send us the code you are using and we can review it.

 
 
 
# Comment by kenfoo
2009-06-03 03:43:02

Hi.

I have affiliates earning commission from selling my products through 2co, and I’m looking at using the 3rd party cart interface instead of the plug and play shopping cart.

Can I combine the use of 3rd party shopping cart + affiliate commissions? Are affiliate commissions even tracked when using the 3rd party shopping cart interface?

Thanks!

 
# Comment by joel 2CO Staff
2009-06-03 14:12:15

Hello Kenfoo,

Suppliers offering products for the 2Checkout affiliate program must use the Plug and Play product system and parameter set. Affiliate commission information is stored at the product level so their is no way to use the 3rd party cart parameter set and take part in the 2Checkout affiliate program. If you use the 3rd party cart parameter set you are only passing us a total and that total is not associated with any plug and play product so the system will not know to offer commission to the affiliate.

 
 
 
# Comment by igor0k
2009-06-19 10:23:26

What paramener I need to use to specify the URL of page for canceling the order?

 
# Comment by joel 2CO Staff
2009-06-19 12:48:58

hello igor0k – There is not a parameter that you can use to specify a page for canceling the order. If a customer wants to cancel an order they need to contact you and request that this be done or contact 2Checkout and request the sale be canceled.

 
 
 
# Comment by igor0k
2009-06-22 14:13:36

If I will send all shipping parameters, how can I disable possibility to change these paramenters in 2CO side by customer?
Order price depends from shipping address, and I want to specify shipping info on my site before customer will be redirected to payment system. And I want to be sure that customer would not change these parameters after redirecting from my site.

 
# Comment by craig 2CO Staff
2009-06-22 14:22:10

Since we do not collect shipping information on third party cart sales we do not allow the customer to change this information in our purchase routine. Customers are only able to enter their shipping address on sales that are passed in using the plug and play parameter set.

 
 
 
# Comment by igor0k
2009-06-22 14:16:33

What parameters will be sent along with: order_number
cart_order_id
credit_card_processed
key
???
can I receive credit_card_processed parameter with deposited or declined value?

 
# Comment by craig 2CO Staff
2009-06-22 14:27:00

The parameters returned depend on the parameter set being used to start the sale. You will receive back all of the parameters listed in the article above except for the shipping and product identification parameters. In addition, if you pass any parameters to our system that are not used by us, they will be returned as-is with the rest of the parameters at the end of the sale. The credit_card_processed parameter will always be returned with a value of Y as every payment option we currently offer can be authorized immediately.

 
 
 
You need to login before leaving a comment If you do not have an account, you can register one here.

Recent Posts from the Community:

API Beta

posted by: cliff
More from the community »

Spotlight Supplier

Spotlight Supplier

Sell Downloads Guide

Spotlight Product

Spotlight Product

Professional Banner Design


Popular Tags