Skip to content

Checkout_Link

Jacob McConnell edited this page Jun 10, 2014 · 1 revision

The checkout function provides you with several methods to pass the sale and the buyer to 2Checkout.

##Method

###link

Use to create a link to a sale to your custom checkout page.

####Arguments

Returns

Returns a checkout link.

Example Usage

var tco = new Twocheckout({
    sellerId: "1817037"
});

var params = {
    'mode': '2CO',
    'li_0_name': 'Test Product',
    'li_0_price': '0.01'
};

// Get a URL encoded payment link
var link = tco.checkout.link(params);

Example Response

https://www.2checkout.com/checkout/purchase?mode=2CO&li_0_name=Test%20Product&li_0_price=0.01&sid=1817037
Clone this wiki locally