Using the Payment Button Generator
Use the OKPAY Button Generator to create the HTML code needed to place an OKPAY button on your website. The generated HTML code, when pasted onto one of your website pages, displays a OKPAY button that lets customers use their OKPAY account to purchase the item(s) associated with the button.
The Button Generator generates HTML code for the entire range of OKPAY buttons, including Buy Now, shopping cart, donation, and subscription buttons. Using the Button Generator, create the HTML code for each OKPAY button you need on your website. Then, copy and paste the HTML code to the appropriate spot on your website. It's as easy as that, and OKPAY handles all the back-end processing for your business payments.
1. Access the OKPAY Button Generator
To access the Button Generator:
- After logging in to OKPAY, select Profile, then click Button Generator under Merchant category.
- You will see a special form allowing you to create your payment link or button simply and clearly.
2. Specify your button details
Choose the type of button you want to create, then specify the rest of the details. We'll use the Payment button, as an example, as the process is quite similar for all options.
Describe your item
Choose the wallet in which this purchase will be placed, then select the item type and provide the name that will be visible to your customers. Or, you can specify the item's article number for tracking purchases of that item in your database.
You can set the price, or your customers can decide how much they want to pay
You can allow your customers to enter the price or payable amount, or you can set the price and hard-code the amount to be paid. Leave the Amount field blank to allow your customers to send an amount of their choosing.
Choose a graphic for your button
You can choose from many different graphics or you can just create a link. This link can be put in an e-mail or chat message for sending to your customer or payer instantly.
Figure 1. Examples of button options.
Provide advanced options if needed
These settings are optional and by default are hidden from customer view. Click to Show extra details to provide this extra information, which includes: unique article number/invoice to help you identify the item in subsequent transactions, custom sucess and fail URLs, custom IPN URL, etc.
Once you have specified all the details for your button, click Create Button to have OKPAY generate the custom code for your button.
For example, to create a simple OKPAY Buy Now button:
- Select Payment from the link type list.
- Type the name of the item into the Name field.
- Enter the price of the item into the Price field, and select a currency (Euro is the default currency).
- Click Create Button to have the Button Generator generate a custom button that is associated with your OKPAY account.
Note: Providing specific details for all Button Generator input fields is beyond the scope of this short guide. For information on how to use all the fields in the Button Generator form, see the Payment Links Variable Reference.
3. Paste the button code into your HTML page
When you click Create Button, the Button Generator generates a custom HTML code that is specific to the properties you specified for that button. To make the button accessible to your customers, select the HTML button code and copy it to your clipboard. Then, using your website editor, open the web page where you want the button displayed and paste the HTML code in the appropriate location on the page.
How you paste the button code onto a web page depends on the application you use to create and edit your website. While many website editors offer a "what you see is what you get" (WYSIWYG) editing mode, you'll want to paste the HTML code into the "code" view of your editor (you should be viewing HTML code when you paste your generated OKPAY button code). If you paste the button code into the WYSIWYG view, the editor may modify the HTML code and the OKPAY button will not display correctly.
Tips for Pasting the Generated OKPAY Button Code
Make sure the code you paste onto your web page (or into an e-mail message) exactly matches the code that was generated by the Button Generator. Pasted code may not match the generated code for the following reasons:
- You did not copy all of the generated code.
- Your editing tool might have special areas for pasting HTML code and different areas for pasting URLs or display text. Be sure you paste the generated code into a field that accepts HTML code.
- Your editing tool might change some characters in the pasted code. For example, your editor might have a variable enumeration feature that modifies field names when you paste code.
Hint: If you have the required technical skills you can also create payment links and buttons dynamically using information in the Payment Links Variable Reference, subsection of the Comprehensive Manual.