Custom Purchase Links

Many of our suppliers have asked if they can customize their Plug and Play purchase links. This article will demonstrate an easy way to do so.

Below is an example of part of an HTML Snippet we may provide. This snippet can be found in the ‘Set Up Products’ section of your account by clicking the ‘HTML’ link for the appropriate product:

<a href="https://www.2checkout.com/checkout/purchase?sid=11&quantity=1&product_id=4"> PRODUCT NAME </a>

Once a supplier has copy and pasted this auto-generated code into their site, it will appear like this to a web browser:

PRODUCT NAME

Using the auto-generated code as a starting point, we can simply remove the link text and replace it with the HTML code for an image:

<a href="https://www.2checkout.com/checkout/purchase?sid=11&quantity=1&product_id=4"><img src="XXXXXX" alt="PRODUCT NAME"></a>

Please make sure that you replace “XXXXXX” with a link to the desired purchase image hosted on your site, “PRODUCT NAME” with your actual product name or other appropriate text and “11″ with your own 2CO supplier ID.

Using Checkboxes With The Plug and Play Purchase Parameters

While the Plug and Play parameter set is typically implemented based on the provided HTML code, it can be extended and used in other forms. In this article we will explain how you can use the plug and play parameters with checkboxes. This will allow you to build an order form on your site where your customers can check the products or services they wish to buy all at once. We will also look at the use of checkboxes for product add-on and options.

Continue reading…

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. 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
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 your 2Checkout account.
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 – 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.
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, 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. If there are options on the products it will cause an error and redirect the customer back to the order review page.
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. (no limit):

  • This parameter will over-ride any URL set on the Look and Feel page.
  • If Direct Return is disabled: If only one product is ordered, it will over-ride the return URLs on the product as well. If more than one product is ordered, then this parameter will control where the “Click Here to Notify [Your Company]” button on the final page takes the customer, but the return URLs on the products will be listed as links below the button, next to the description of the product.
  • If Direct Return is enabled : If one product is ordered, this parameter will NOT over-ride the return URLs on the products. If more than one product is ordered, then this parameter will over-ride the product return URLs. Also keep in mind that many third party shopping carts recommend that Direct Return be disabled to work properly.

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.

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/checkout/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).
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.

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

How do I add multiple products to the PNP cart using one link?

If you have chosen to upload your products to our database (instead of using a third-party cart), you can create a single link that – when clicked – will add two or more products to the 2CO cart.

https://www.2checkout.com/checkout/purchase?sid=XXXXXX&product_id1=Y&product_id2=Z&quantity1=1&quantity2=1

Be sure to replace the Xs with your numerical seller ID, the Y with the ID of your first product and Z with the ID of your second product.

To add more than two products with one action, simply append a product_id3 and quantity3 parameter, then a product_id4 and quantity4 parameter and so on.

You can use our developers.2Checkout area to see how to use the Plug-n-Play parameter set for creating links with multiple products within one link. The Purchase Machine section will allow you to create sample purchase links using the various parameter sets.

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.

Can I Integrate Your Plug n’ Play Cart into a Macromedia Flash-based website?

Yes.

Because our Plug n’ Play cart functions through the use of standard HTML forms, you can use the PNP cart in any website creation utility that supports HTML forms, including Macromedia’s Flash product.

Recent Posts from the Community:

Get Payments

posted by: dspzaman

Referring URL

posted by: hipdev

SPP suggestion

posted by: brakkar

API Beta

posted by: cliff

session destroy

posted by: rojan
More from the community »

Spotlight Supplier

Spotlight Supplier

Feng Shui Products


Popular Tags