2Checkout Documentation

Plug and Play

If you are not using your own shopping cart application, the Plug and Play parameters provide you with an easy solution to pass products to our checkout. These parameters can only be used if you have first created your products and shipping methods (if applicable) in your 2Checkout account.

Checkout URL

When testing in our sandbox, you will need to use our sandbox checkout URL:

Required Parameters

sidYour 2Checkout account number. (64 characters max)
product_idThe 2CO ID for the product or service in your 2Checkout account.
quantityThe quantity of the product. (99 max value)

You can use these parameters to pass in multiple products as well. To do so 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.

Additional Parameters

demoY to enable demo mode. Do not pass for live sales. Can also be controlled within the account.
fixedY to remove the Continue Shopping button and lock the quantity fields.
currency_codeARS, AUD, BRL, GBP, CAD, DKK, EUR, HKD, INR, ILS, JPY, LTL, MYR, MXN, NZD, NOK, PHP, RON, RUB, SGD, ZAR, SEK, CHF, TRY, AED, USD. Use to specify the currency for the sale.
langChinese – zh, Danish – da, Dutch – nl, French – fr, German – gr, Greek – el, Italian – it, Japanese – jp, Norwegian – no, Portuguese – pt, Slovenian – sl, Spanish (European) – es_ib, Spanish (Latin) – es_la, Swedish – sv, English – en
merchant_order_idSpecify your order number with this parameter. It will also be included in the confirmation emails to yourself and the customer. (50 characters max)
pay_methodCC for Credit Card, PPI for PayPal. This will set the default selection on the payment method step during the checkout process.
purchase_stepSets the purchase step that the buyer will land on when being directed to the checkout page. Possible values are ‘review-cart’, ‘shipping-information’, ‘shipping-method’, ‘billing-information’ and ‘payment-method’. Please Note: To skip a purchase step, all required fields must be pre-populated with the parameters that are passed in with the sale. If a required field is not pre-populated, the buyer will revert back to the step that needs to be completed.
x_receipt_link_urlUsed 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 Site Management page. (no limit)
couponSpecify a 2Checkout created coupon code. If applicable, the coupon will be automatically applied to the sale.

To pre populate the billing information page you may pass in:

card_holder_nameCard 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_addressCard holder’s street address(64 characters max)
street_address2The second line for the street address, typically suburb or apartment number information (64 characters max)
cityCard holder’s city (64 characters max)
stateCard holder’s state (64 characters max)
zipCard holder’s zip (16 characters max)
countryCard holder’s country (64 characters max)
emailCard holder’s email (64 characters max)
phoneCard holder’s phone (16 characters max)
phone_extensionCard holder’s phone extension (9 characters max)

To pre populate the shipping information page you may pass in:

ship_nameRecipient Name
ship_street_addressRecipient Address 1
ship_street_address2Recipient Address 2
ship_cityRecipient City
ship_stateRecipient State
ship_zipRecipient Zip
ship_countryRecipient Country

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 Site Management page to receive any of these parameters back as they are not included in the confirmation emails.

Parameters Returned

You will receive back all of the parameters that were passed in as well as the following parameters:

ParameterDescription order number
credit_card_processedY if successful (Approved).
totalthe total amount of the purchase
keythe MD5 hash used to verify that the sale came from one of our servers

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

Please Note: If you pass in a tangible product, the buyer will need to select an existing shipping method that you created in your account and the sale will need to be marked as shipped before it will deposit into your pending payment. If the order is not marked as shipped with-in 7 days of being placed, it will need to be reauthorized prior to being marked as shipped. For more information on marking sales as shipped in the admin, please visit the Mark as Shipped section of our documentation. This can also be done using our reauth and mark shipped API calls which are outlined in the API documentation.

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.