Web Cart

Build a shopping destination

No Assembly Required
So dead simple to integrate, you won't believe it. It requires only one line of code to be copied to your web pages and no software to install and configure.




Adding the 'Cart Request' to your web pages

Just copy the one line "Cart Request" code below into your web page's HTML source code and you're done! It should be placed between your web page's <head> tags. Make sure to replace the "YOUR_API_KEY_HERE" with your actual API Key. If you don't have your API Key, you can get it by logging into Payvment here. Now when someone clicks one of your Add to Cart buttons or referral links, the shopping cart will magically appear and kick into action. You will want to add the Cart Request to each page of your website. This way the cart is always accessible to your users if they have items in it. If no items are in the cart, the cart will remain hidden by default.

Demo

<script src="https://api.payvment.com/cart/?apiKey=YOUR_API_KEY_HERE" type="text/javascript"></script>


Adding your 'Add to Cart' buttons

There are two Add To Cart button types you can use depending on your needs. One for selling items directly from your site and another for adding Affiliate/Referral items to the cart for items not available from your website. You can use both at the same time if you wish. The cart seperates these items.
  • Direct Sales
  • Affiliate/Referral links

Building an Add To Cart button is pretty simple and uses a standard html form structure (yet functions quite differently than a normal html form). Copy the code below into a web page's source code to see how they are structured. If the Cart Request from above has been added to your web page as well, you'll see how it instantly sends items to a user's cart. Make sure to keep class="payvment" in the first line of the form code. This enables the item to be added to the cart instantly without any page reload. Payvment's shopping system enables your user's cart to contain items from multiple retailers if you choose. The "payvmentID" variable in the add to cart button tells our shopping engine what retailer should recieve the order and revenue for the item in the cart upon the completed purchase. If your store will contain items from multiple retailers, each retailer will need their own Payvment account (which is free) to recieve their own Payvment ID..

Advanced integration: For large web destinations, selling many products from many retailers, these variables would be dynamically generated from your website's database.

<form name="product_001" class="payvment" >
	<input name="payvmentID" type="hidden" value="3011" />
    <input name="command" type="hidden" value="addStoreItem" />
    <input name="itemName" type="hidden" value="Die Symphony T-Shirt" />
    <input name="itemID" type="hidden" value="mystore_tshirt001" />
    <input name="itemCurrency" type="hidden" value="USD" />
	<input name="itemPrice" type="hidden" value="15.95" />
	<input name="itemShipping" type="hidden" value="1.50" />
    <input name="itemShipping2" type="hidden" value="1.00" />
    Qty:
    <input name="itemQty" type="text" value="1" size="2" />
    Color:
    <select name="itemOption1">
    	<option value="Black">Black</option>
		<option value="White">White</option>
	</select>
    Size:
    <select name="itemOption2">
    	<option value="Small">Small</option>
    	<option value="Medium">Medium</option>
    	<option value="Large">Large</option>
	</select>
    <input name="itemNoShip" type="hidden" value="0" />
    <input type="image" src="https://payvment.s3.amazonaws.com/addtocart.png" value="Add To Cart" />
</form>
        

Auto-Builder
Variable
Description
Required
payvmentID
This variable is the retailer's Payvment ID and is used to specify which retailer should recieve the revenue and item order after a purchase is made. Retailer's can get their Payvment ID from the Payvment dashboard.
Yes
command
Set variable as "addStoreItem"
Yes
itemName
This variable is the name of the item. Example: Polo Shirt
Yes
itemID
This variable is the item's unique SKU or ID. Example: mystore_001
Yes
itemPrice
This variable should contain the sale price of the item. Example: 16.99
Yes
itemShipping
This variable should contain the amount you would like to add for shipping & handling. Example: 1.50
No
itemShipping2
This variable should contain the amount you would like to add for shipping & handling on additional units of this item. If left blank, the amount set for 'itemShipping' will be a flat rate no matter the quantity. Example: 1.50
No
itemCurrency
This variable tells the cart what currency your pricing is set in. If this variable is not added, the item will be in USD (U.S. Dollar). Variable should be set using a currency's three letter abbreviation.

Accepted currency types are:
AUD – Australian Dollar
CAD – Canadian Dollar
CZK – Czech Koruna
DKK – Danish Krone
EUR– Euro
HKD – Hong Kong Dollar
HUF – Hungarian Forint
ILS – Israeli New Sheqel
JPY – Japanese Yen
MXN – Mexican Peso
NOK – Norwegian Krone
NZD – New Zealand Dollar
PHP – Philippine Peso
PLN – Polish Zloty
GBP – Pound Sterling
SGD – Singapore Dollar
SEK – Swedish Krona
CHF – Swiss Franc
TWD – Taiwan New Dollar
THB – Thai Baht
USD – U.S. Dollar
No
itemQty
This optional variable sets the quantity of the item being added to the cart.
No
itemOption1
This optional variable is used to specify a product's option.
No
itemOption2
This optional variable is used to specify a product's option.
No
itemOption3
This optional variable is used to specify a product's option.
No
itemOption4
This optional variable is used to specify a product's option.
No
itemNoShip
This optional variable can be used if your item does not require shipping such as a service or donation. The variable will disable Quantity for the item and if all items in a cart have 'itemNoShip' set to '1', checkout will not require a shipping address.
No
Exit Auto-Builder

Want an Add To Cart button built automatically? Click submit and we'll give you the code you need.

Payvment ID:

REQUIRED: This is the reatiler's Payvment ID which is available from the dashboard.
Item Name:

REQUIRED: This is the name of the item.
Item ID:

REQUIRED: This is the item's unique SKU or ID.
Currency:

This is the currency type the price is set in.
Price:

REQUIRED: This is the amount to charge for the item. Do NOT include the currency symbol.
Use Shipping:

Will this item be shipped or is it an item such as a service or donation that does not require shipping?
Shipping Price:

If the item requires shipping, this is the amount you would like to charge. Do NOT include the currency symbol.
Additional Shipping:

If the item requires shipping on additional quantity, this is the amount you would like to charge. If this is not set, The item will ship at the flat amount set with 'Shipping Price'. Do NOT include the currency symbol.
Submit

Here's your code! Feel free to modify it for your needs.
You can replace the Add To Cart image in this code with your own.

<form name="myproduct1" class="payvment" >
<input name="payvmentID" type="hidden" value="" />
<input name="command" type="hidden" value="addStoreItem" />
<input name="itemName" type="hidden" value="" />
<input name="itemID" type="hidden" value="" />
<input name="itemCurrency" type="hidden" value="" />
<input name="itemPrice" type="hidden" value="" />
<input name="itemShipping" type="hidden" value="" />
<input name="itemShipping2" type="hidden" value="" />
<input name="itemNoShip" type="hidden" value="" />
<input type="image" src="https://payvment.s3.amazonaws.com/addtocart.png" value="Add To Cart" />
</form>


Start Over

Using the shopping cart with your Affiliate/Referral links does not require altering the retailer's URL in any way. All you need to do is add "payvment" to a 'class' tag and the variables listed below into a 'ref' tag. You can copy the sample code below into your web page to try it for yourself. Since the link's URL is not altered, the link will work as normal if the 'Cart Request' was not added to your web page. If the 'Cart Request' is present, the item will be added to the cart and your user will remain on your website to continue browsing until they are ready to checkout.

<a href="http://www.amazon.com/True-Blood-Complete-First-Season/dp/B001FB4W0W/" rel="payvmentID=3011&cartType=1&itemName=True+Blood%3A+The+Complete+First+Season&itemRetailer=Amazon&itemUrlType=2" class="payvment">Buy True Blood: The Complete First Season at Amazon.com</a>

Auto-Builder
Variable
Description
Required
payvmentID
This variable is your Payvment ID. You can get your Payvment ID from the dashboard.
Yes
cartType
This variable tells the shopping cart that this is an Affiliate/Referral item. Use like this: cartType=1
Yes
itemName
This variable is the name of the item that will appear in the cart. This variable should be URL encoded.
Yes
itemRetailer
This variable is the name of the retailer. This variable should be URL encoded.
Yes
itemUrlType
This variable specifies if the URL adds the item to the retailer's cart or if the URL is a referral link to the retailer's product page.
1=Add to Cart URL
2=Product Page URL
Yes
Exit Auto-Builder

Want an Affiliate/Referral link built automatically? Click submit and we'll give you the code you need.

Your Payvment ID:

REQUIRED: This is your Payvment ID which you can get from the dashboard.
Item Name:

REQUIRED: This is the name of the product.
Retailer:

REQUIRED: This the name of the retailer that this referral link belongs to.
URL:

REQUIRED: This is the retailer's referral URL.
URL Type:

REQUIRED: Does the URL take you to the retailer's product page or add the item to the retailer's cart?
Submit

Here's your link code! Feel free to modify it at will.

<a href="" rel="payvmentID=&cartType=1&itemName=&itemRetailer=&itemUrlType=" class="payvment">Buy at </a>


Start Over



Next: Connect your cart to Facebook