HTML Variables for Website Payments Standard 2

HTML Variables for Individual Items

HTML variables for individual items specify information about a product or service for Buy Now and Add to Cart buttons, or they specify information about a contribution for Donate buttons.

Table 3. HTML Variables for Individual Items

Name

Required or Optional

Description

Character Length

amount

See description.

The price or amount of the product, service, or contribution, not including shipping, handling, or tax. If omitted from Buy Now or Donate buttons, payers enter their own amount at the time of payment.

  • Required for Add to Cart buttons
  • Optional for Buy Now and Donate buttons
  • Not used with Subscribe or Buy Gift Certificate buttons
 

discount_amount

Optional

Discount amount associated with an item.

It must be less than the selling price of the item. If you specify discount_amount and discount_amount2 is not defined, then this flat amount is applied regardless of the quantity of items purchased.

Valid only for Buy Now and Add to Cart buttons.

 

discount_amount2

Optional

Discount amount associated with each additional quantity of the item.

It must be equal to or less than the selling price of the item. A discount_amount must also be specified as greater than or equal to 0 for discount_amount2 to take effect.

Valid only for Buy Now and Add to Cart buttons.

 

discount_rate

Optional

Discount rate (percentage) associated with an item.

It must be set to a value less than 100. If you do not set discount_rate2, the value in discount_rate applies only to the first item regardless of the quantity of items purchased.

Valid only for Buy Now and Add to Cart buttons.

 

discount_rate2

Optional

Discount rate (percentage) associated with each additional quantity of the item.

It must be equal to or less 100. A discount_rate must also be specified as greater than or equal to 0 for discount_rate2 to take effect.

Valid only for Buy Now and Add to Cart buttons.

 

discount_num

Optional

Number of additional quantities of the item to which the discount applies.

Applicable when you use discount_amount2 or discount_rate2. Use this variable to specify an upper limit on the number of discounted items.

Valid only for Buy Now and Add to Cart buttons.

 

item_name

See description.

Description of item. If omitted, payers enter their own name at the time of payment.

  • Optional for Buy Now, Donate, Subscribe and Add to Cart buttons
  • Not used with Buy Gift Certificate buttons

127

item_number

Optional

Pass-through variable for you to track product or service purchased or the contribution made. The value you specify passed back to you upon payment completion.

127

quantity

Optional

Number of items. If profile-based shipping rates are configured with a basis of quantity, the sum of quantity values is used to calculate the shipping charges for the transaction. PayPal appends a sequence number to uniquely identify the item in the PayPal Shopping Cart (e.g., quantity1, quantity2).

Note: The value for quantity must be a positive integer. Null, zero, or negative numbers are not allowed.

 

shipping

Optional

The cost of shipping this item. If you specify shipping and shipping2 is not defined, this flat amount is charged regardless of the quantity of items purchased.

This use of the shipping variable is valid only for Buy Now and Add to Cart buttons.

Default – If profile-based shipping rates are configured, buyers are charged an amount according to the shipping methods they choose.

 

shipping2

Optional

The cost of shipping each additional unit of this item. If omitted and profile-based shipping rates are configured, buyers are charged an amount according to the shipping methods they choose.

Valid only for Buy Now and Add to Cart buttons.

 

tax

Optional

Transaction-based tax override variable. Set this to a flat tax amount to apply to the transaction regardless of the buyer's location. This value overrides any tax settings set in your account profile. Valid only for Buy Now and Add to Cart buttons. Default – Profile tax settings, if any, apply.

 

tax_rate

Optional

Transaction-based tax override variable. Set this to a percentage that will be applied to amount multiplied the quantity selected during checkout. This value overrides any tax settings set in your account profile. Allowable values are numbers 0.001 through 100. Valid only for Buy Now and Add to Cart buttons. Default – Profile tax settings, if any, apply.

6

undefined_ quantity

Optional

1 – allows buyers to specify the quantity.

  • Optional for Buy Now buttons
  • Not used with other buttons

1

weight

Optional

Weight of items. If profile-based shipping rates are configured with a basis of weight, the sum of weight values is used to calculate the shipping charges for the transaction.

 

weight_unit

Optional

The unit of measure if weight is specified. Allowable values:

  • lbs
  • kgs

The defaults is lbs.

 

on0

Optional

First option field name and label. The os0 variable contains the corresponding value for this option field. For example, if on0 is size, os0 could be large.

  • Optional for Buy Now, Subscribe, and Add to Cart buttons
  • Not used with Donate or Buy Gift Certificate buttons

64

on1

Optional

Second option field name and label. The os1 variable contains the corresponding value for this option field. For example, if on1 is color then os1 could be blue.

You can specify a maximum of 7 option field names (6 with Subscribe buttons) by incrementing the option name index (on0 through on6).

  • Optional for Buy Now, Subscribe, and Add to Cart buttons
  • Not used with Donate or Buy Gift Certificate buttons

64

os0

Optional

Option selection of the buyer for the first option field, on0. If the option field is a dropdown menu or a set of radio buttons, each allowable value should be no more than 64 characters. If buyers enter this value in a text field, there is a 200-character limit.

Note: The option field on0 must also be defined. For example, it could be size.

For priced options, include the price and currency symbol in the text of the option selections, as the following sample code shows:

<option value="small">small - $10.00</option>

Add a corresponding option_select0 and option_amount0 variable for each priced option. Priced options are supported only for Buy Now and Add to Cart buttons. Only one dropdown menu option selection can have priced options.

  • Optional for Buy Now, Subscribe, and Add to Cart buttons
  • Not used with Donate or Buy Gift Certificate buttons

64 or 200

See description.

os1

Optional

Option selection of the buyer for the second option field, on1. If the option field is a dropdown menu or a set of radio buttons, each allowable value should be no more than 64 characters. If buyers enter this value in a text field, there is a 200-character limit.

You can specify a maximum of 7 option selections (6 with Subscribe buttons) by incrementing the option selection index (os0 through os6). You can implement up to 5 option selections as dropdown menus and up to 2 option selections as test boxes.

Note: A corresponding option field (on0 through on6) must defined.

  • Optional for Buy Now, Subscribe, and Add to Cart buttons
  • Not used with Donate or Buy Gift Certificate buttons

64 or 200

See description.

option_index

See description.

The cardinal number of the option field, on0 through on9, that has product options with different prices for each option. You must include option_index if the option field with prices is not on0.

  • Optional for Buy Now and Add to Cart buttons
  • Not used with Donate, Subscribe, or Buy Gift Certificate buttons

Default – 0

 

option_select0

Optional

For priced options, the value of the first option selection of the on0 dropdown menu. The values must match exactly, as the next sample code shows:

<option value="small">small - $10.00</option>  
... 
<input type="hidden" name="option_select0" value="small"> 

  • Optional for Buy Now and Add to Cart buttons
  • Not used with Donate, Subscribe, or Buy Gift Certificate buttons

64

option_amount0

Optional

For priced options, the amount that you want to charge for the first option selection of the on0 dropdown menu. Use only numeric values; the currency is taken from the currency_code variable. For example:

<option value="small">small - $10.00...  
<input type="hidden" name="option_amount0"</option> value="10.00"> 

  • Optional for Buy Now and Add to Cart buttons
  • Not used with Donate, Subscribe, or Buy Gift Certificate buttons

64

option_select1

Optional

For priced options, the value of the second option selection of the on0 dropdown menu. For example:

...  
<option value="medium">small - $10.00</option>... 
<input type="hidden" name="option_select" value="medium"> 

You can specify a maximum of ten option selections by incrementing the option selection index (option_select0 through option_select9).

Note: A corresponding option selection in os0 must also be set.

  • Optional for Buy Now and Add to Cart buttons
  • Not used with Donate, Subscribe, or Buy Gift Certificate buttons

64

option_amount1

Optional

For priced options, the amount that you want to charge for the second option selection of the on0 dropdown menu. For example:

...  
<option value="small">medium - $15.00</option> 
... 
<input type="hidden" name="option_amount1" value="15.00"> 

You can specify a maximum of ten option amounts by incrementing the option amount index (option_amount0 through option_amount9).

Note: A corresponding option selection in os0 must also be set.

  • Optional for Buy Now and Add to Cart buttons
  • Not used with Donate, Subscribe, or Buy Gift Certificate buttons

64

Search This Blog

Link Within Related Posts Plugin for WordPress, Blogger...