Installment Plan: Sample HTML button code

The following code samples demonstrate various features of PayPal hosted Installment Plan buttons:

Important: Buttons created on the Create a PayPal payment button page are automatically secured. However, these samples contain unencrypted button code for illustrative purposes only. In your website production environment, always use encrypted or hosted buttons to prevent malicious tampering. If you're manually creating payment buttons, see Secure your HTML buttons for information on security strategies.

Basic Installment Plan button

The following sample code illustrates a basic Installment Plan button, with these features:

  • 4 Payments of $75.00 USD each, beginning at checkout
  • Payment periods of one month each
  • The description Pay in 4 installments above the button
  • Details of the plan above the button
  • The total payment – $300.00 USD – above the button
  • Buyer's address required during checkout
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="your-secure-merchant-ID">

<!-- Specify an Installment Plan button. -->
<input type="hidden" name="cmd" value="_xclick-payment-plan">

<!-- Specify details about the item being purchased under the plan. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Electric Oven">
<<input type="hidden" name="disp_tot" value="Y">

<!-- Make sure you get the buyer's address during checkout. -- >
<input type="hidden" name="no_shipping" value="2">

<!-- Set up the plan with equal 4 payments, starting at checkout. -->
<input type="hidden" name="option_select0" value="option_0">
<input type="hidden" name="option_select0_name"
value="Pay in 4 installments">
<input type="hidden" name="option_select0_type" value="E">
<input type="hidden" name="option_select0_a0" value="75.00">
<input type="hidden" name="option_select0_p0" value="1">
<input type="hidden" name="option_select0_t0" value="M">
<input type="hidden" name="option_select0_n0" value="4">
<input type="hidden" name="option_index" value="0">

<!-- Display the plan description above the button. -->
<table>
<tr>
<td><input type="hidden" name="on0" value="plan"></td></tr>
<tr>
<td><input type="hidden" name="os0" value ="option_0"></td>
<td><b>Electic Oven</b></td></tr>
<tr>
<td></td>
<td>Number of payments: 4</td></tr>
<tr>
<td></td>
<td>Start payments at checkout</td></tr>
<tr>
<td></td>
<td>
<!-- a 2 column table for due and amount -- >
<table>
<tr>
<th>Due*</th><th>Amount</th></tr>
<tr>
<td colspan="2"><hr /></td></tr>
<tr>
<td>At checkout</td>
<td>$75.00 USD</td></tr>
<tr>
<td>Every 1 month (x 3)</td>
<td>$74.75 USD</td></tr>
<tr>
<td colspan="2"><hr /></td></tr>
<tr>
<td colspan="2"
align="right"><b>Total $300.00 USD</b></td></tr>
</table></td></tr>
<tr>
<td colspan="3"><i>* We calculate payments from the
   date of checkout.</i></td></tr>
</table>

<!-- Display the Installment Plan button. -->
<table>
<tr>
<td><i>Sign up for</i></td></tr>
<tr>
<td><input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_installment_plan_LG.gif"
alt="PayPal - The safer, easier way to pay online!"></td></tr>
</table>
<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">

</form>

Installment Plan with options

The sample code below illustrates an Installment Plan button with these features:

  • Two plan options – Pay in Full and No Payments for 30 Days
  • For plan option Pay in Full, the total payment at checkout, amount $300 USD
  • For plan option No Payments for 30 Days:Payment:
    • First payment 1 month after checkout, amount $150 USD
    • Second payment 2 months after checkout, amount $50 USD
    • Third payment 3 months after checkout, amount $50 USD
    • Fourth payment 4 months after checkout, amount $50 USD
  • The description No Payments for 30 Days above the button
  • Details of the plan above the button
  • The total payment – $300.00 USD – above the button
  • Buyer's address required during checkout
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Identify your business so that you can bill for payments. -->
<input type="hidden" name="business" value="your-secure-merchant-ID">

<!-- Specify an Installment Plan button. -->
<input type="hidden" name="cmd" value="_xclick-payment-plan">

<!-- Specify details about the installment plan. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Electric Oven">
<input type="hidden" name="disp_tot" value="Y">

<!-- Make sure you get the buyer's address during checkout. -- >
<input type="hidden" name="no_shipping" value="2">

<!-- Set up 2 plan options for buyers to choose. -->
<input type="hidden" name="option_select0" value="option_0">
<input type="hidden" name="option_select0_name"
value="Pay In Full">
<input type="hidden" name="option_select0_type" value="F">
<input type="hidden" name="option_select0_a0" value="300.00">
<input type="hidden" name="option_select0_p0" value="1">
<input type="hidden" name="option_select0_t0" value="D">
<input type="hidden" name="option_select0_n0" value="1">
<input type="hidden" name="option_select1" value="option_1">
<input type="hidden" name="option_select1_name"
value="No Payment for 30 Days">
<input type="hidden" name="option_select1_type" value="E">
<input type="hidden" name="option_select1_a0" value="0.00">
<input type="hidden" name="option_select1_p0" value="1">
<input type="hidden" name="option_select1_t0" value="M">
<input type="hidden" name="option_select1_n0" value="1">
<input type="hidden" name="option_select1_a1" value="150.00">
<input type="hidden" name="option_select1_p1" value="1">
<input type="hidden" name="option_select1_t1" value="M">
<input type="hidden" name="option_select1_n1" value="1">
<input type="hidden" name="option_select1_a2" value="50.00">
<input type="hidden" name="option_select1_p2" value="1">
<input type="hidden" name="option_select1_t2" value="M">
<input type="hidden" name="option_select1_n2" value="3">
<input type="hidden" name="option_index" value="0">

<!-- Display 2 plan options for buyers to choose. -->
<table>
<tr>
<td colspan="2"><input type="hidden" name="on0" value="plans"></td></tr>

<!-- Pay in Full plan option -->
<tr>
<td><input type="radio" name="os0" value ="option_0"
checked="checked"></td>
<td><strong>Pay In Full</strong></td>
</tr>
<tr>
<td></td>
<td>Amount at checkout $300.00 USD</td>
</tr>

<!-- No Payment for 30 Days plan option -->
<tr>
<td><input type="radio" name="os0" value ="option_
1"></td>
<td><strong>No Payments for 30 Days</strong></td>
</tr>
<tr>
<td></td>
<td>Number of payments: 4</td>
</tr>
<tr>
<td></td>
<td>Start payments after 1 month</td></tr>
<tr>
<td></td>
<td>
<table>
<tr>
<th>Due*</th>
<th>Amount</th>
</tr>
<tr>
<td colspan="2"><hr /></td></tr>
<tr>
<td>First Payment</td>
<td>$150.00 USD</td>
</tr>
<tr>
<td>Every 1 month (x 3)</td>
<td>$50.00 USD</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td colspan="2"><b>
Total&nbsp;&nbsp;&nbsp;
$300.00 USD</b></td>
</tr>
</table></td></tr>
<tr>
<td colspan="3"><i>* We calculate payments from the
date of checkout.</i></td>
</tr>
</table>

<!-- Display the Installment Plan button -->
<table>
<tr><td><i>Sign up for</i></td></tr>
<tr><td><input type="image" name="submit"
src="https://www.paypalobjects.com/en_US/i/btn/btn_installment_plan_LG.gif"
alt="PayPal - The safer, easier way to pay online!"></td></tr>
</table>

<img alt="" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"
</form>

The preceding sample code produces the following result on your webpage:

See also