Visit this site. Sign up for OKPAY and start accepting payments instantly.

OKPAY - Developer

Developer Tools Overview

Easy, customized Shop Systems integration

Add OKPAY as a payment option on your website!

There are different ways of integrating your business with OKPAY. We offer various integration options, which makes them suitable for all users, from beginners who are newcomers in the world of electronic commerce to seasoned Internet tycoons who wish to advance their prosperous online businesses to a new level.

For all users, including those not running a website

Marketplace
Marketplace - Start selling your goods or services to the whole OKPAY community now! Using the Marketplace, you can set up your own online store in just a quarter of an hour while not necessarily having any special programming skills.

For users with their own website(s)

Shop Systems
E-commerce Systems – Using a shopping cart for your online store provides a quick and easy online shopping experience for your customers. OKPAY is linked to the widest range of shopping carts giving you the ultimate in choice to suit your business needs.
Payment Links and Buttons
Payment Links and Buttons – These objects can be easily created using our configuration forms. No programming skills are required, so simple text links or secure encrypted buttons can be added to your website in seconds. You can add many parameters to suit your product or service. Our Payment Links & Buttons Generator can be found in your OKPAY Profile » Merchant section.
OKPAY Seal
OKPAY Seal represents a graphic proof of your genuine OKPAY account. This is similar to presenting your credentials to a prospective business partner prior to negotiating a deal.

For users with programming skills

We have various types of API (Application Programming Interface) functionality.
IPN
Payment Notification (IPN) - OKPAY messaging service that sends out transaction-related notifications. Once IPN is integrated, sellers do not have to wait for actual payments to come in, thus being able to better automate their back office.
Interfaces
Program Interfaces (API) - Full payment functionality integration for website developers. This is for more complex requirements and should fill the bill if you have prior knowledge of API/website development.

Marketplace

Increase the visibility of your products and services, advertise and sell your goods and expertise in the OKPAY Marketplace.
Using the Marketplace, you can set up your own online store in just a quarter of an hour while not necessarily having any special programming skills.
Your products will be presented to the wide and varied community of OKPAY users, thus increasing sales of your goods, services, subscriptions, etc. The most popular products will be displayed on the main page of the okpay.com website, as well as in registered users’ private space. As a result your products will feature as exclusive offers to a community of well-heeled buyers who will only need one click of the mouse to make a purchase!
To get started with the Marketplace, simply register in the Profile -> Merchant -> Marketplace section and then provide a description of your products or services.
To make it quite simple, a product or service specification can comprise just three fields: title, description, and price. In addition, you can upload images, associate your product with your existing catalogue (price list or database) using the field "Item No.", indicate the available quantity of the product in stock (with every purchase, this value will be automatically reduced accordingly) and provide other information.
Navigate to the Marketplace stock manager within your account, add your goods, services or digital products to the catalogue -- and start making money, all in a matter of minutes!
Additionally, if you have sufficient programming skills, you can automate the sales and stock management routine as described elsewhere in Program Interfaces.

Payment Links & Buttons Overview

Start accepting OKPAY, the world’s most convenient electronic currency. Turn your website into an online store today!

Purchasing with a few mouse clicks

Your customers will pay you with just a few mouse clicks. A typical payment routine is as follows.
1. You place a payment link (button) for any of your goods or services on a page on your website.
2. A visitor clicks on this link and is transferred to a payment processing page at OKPAY. This page may contain a logo, title and description of your online store. Optionally, you can specify your phone number, email address and/or the URL of customer support. All these details will be displayed at the top of the payment processing page, so your client will be able to ask you for support in case of problems or if they have any questions about the purchase.
3. Once the customer has paid, he/she returns to your website, to the page that you specify in the auto-return URL.
Your visitor stays on your website while making the purchase.

Creating payment links and buttons

Step-by-step generation of payment links

Your site is up, but how are customers going to pay you? The OKPAY payment links and buttons creation wizard is the fastest way to set up online payment on your website via OKPAY.
You will find this wizard very handy if you only sell a few products or services. If yours is a big business, however, we recommend that you use another option -- see below.

Automatic creation of payment links

If your website sells goods or services in large volumes or if your products (their description, prices, etc.) are stored in a database, you will need to be able to create purchase links automatically, i.e. "on the fly".
These automatically generated payment links will look and work exactly like those created by the wizard; however, they are made with the help of “API variables” of which, of course, we provide a detailed description as regards their purpose, default values, maximum length, etc. Check out Variable Reference to be able to fully employ the functionality of the OKPAY payment system.

E-commerce systems working with OKPAY

We have made integration a simple task which will not require extraordinary programming skills. Go to Supported E-commerce Systems to see a steadily growing list of e-commerce shopping scripts and systems that has already been integrated with OKPAY.

Payment Links & Buttons Creation

OKPAY Payment Links & Buttons generator form provides a simple, step by step method to getting you up and running with your account.
OKPAY static payment link service allows merchants to receive payments securely, without having to integrate their online stores to the OKPAY transaction processing service. With static payment link, you only have to embed one or more HTML links – which OKPAY provides – into your store’s Web page. This link takes your customer to a secure payment page transparently hosted by OKPAY. The customer provides all the required payment information and then confirm payment. That’s all it takes for the purchase to be debited from payment option of customer choice and settled in your OKPAY account.
If you have required technical skills you can also create payment links and buttons automatically using information in our Payment Links & Buttons Variable Reference.

How to create an OKPAY Payment Link or Button

Adding a payment button to your website could not be easier! You can set up the button in about 5 minutes with no advanced programming skills required.
Firstly, log in to your account with OKPAY and go to: Profile -> Merchant -> Payment Links & Buttons. There you will see a special form allowing you to create your payment link or button in two easy steps.

Describe your item

Choose in that wallet this purchase will be placed, then select item type and provide it's name visible for your customers. Optionally, you can specify item's article number for tracking purchase in your database.

You can set the price, or your customer can decide how much he wants to pay

You have the option of allowing the customer or shopper to enter the price or payable amount or you can set the price and hard-code the amount to be paid. Leave Amount field blank to allow your customers to send any amount.

Choose a graphic for your payment button

You can choose from many different graphics or you can just create a link. This link can be put in an email or chat message and instantly sent to your customer or payer.
Buy Now Buy Now Buy Now Click here to pay
OKPAY Button OKPAY Button OKPAY Button OKPAY Button
OKPAY Button OKPAY Button
OKPAY Button OKPAY Button...and many others.

Provide advanced options if needed

These settings are optional and hidden from visitor's eyes by default. You shoud click to Show extra details to provide this extra information, that includes: custom Sucess and Fail URLs, custom IPN URL, etc.

Use your payment button or link anywhere

To use the payment tool obtained as described above, 'copy' the OKPAY code of your preferred payment image and insert it in your website, send via email or IM, etc.

Variable Reference

Using our API you can programmatically create payment buttons and links which are the same kind of buttons and links that you can create from your OKPAY Profile.

Generated payment link code

When you create a button, OKPAY responds by generating code that you can paste into your web page or document.
The generated code includes:
  • HTML code to put the button on a web page;
  • URL link code for adding buttons to emails and documents that support links.
This example shows HTML code for displaying a Buy Now button to sell a Robot:
OKPAY-generated code for a link would be as follows:

Specifying HTML variables

When you create a button, you must specify the same HTML variables that you use when generating Payment Links and Buttons in your account profile.
The following table provides additional information about these variables.
HTML Variable Required or Optional Description Length, characters

Receiver information

ok_receiver Required One of the following: Email address / Cellphone number or Wallet ID. 127

Payment information

ok_currency Optional The currency of the payment. The default is EUR. For valid values see Currency Codes. 3
ok_invoice Optional Invoice reference number or ID. Pass-through variable for you to track the product or service purchased or contribution made. The value you specify is passed back to you upon payment completion (you can use it in your IPN handler or Auto Return URLs). 127
ok_fees Optional This field can assume one of two values. “0” – commission payable by the merchant (default); “1” – commission payable by the buyer. 1
ok_item_#_name Required Name of item. 127
ok_item_#_article Optional Item article number. Pass-through variable for you to track the product or service purchased or contribution made. The value you specify is passed back to you upon payment completion (you can use it in your IPN handler or Auto Return URLs). 40
ok_item_#_type Optional One of item types. The default is digital. 64
ok_item_#_quantity Optional Number of items as entered by your customer or as passed by you, the merchant. This will multiply the amount if greater than one. 8
ok_item_#_price Optional Item price. Limitations: the value must be a positive number; no currency symbol; must have two decimal places, the decimal separator must be a period (.) and the optional thousands separator must be a comma (,).
Total amount for each item will be calculated as follows:
ItemTotal = ok_item_#_price * ok_item_#_quantity + ok_item_#_tax + ok_item_#_handling + ShippingTotal (see bottom);
15
ok_item_#_handling Optional Used only when the merchant applies a handling charge for a specific item. 15
ok_item_#_shipping Optional Used only when the merchant applies a shipping charge for a specific item.
Total shipping for each item will be calculated as follows:
ShippingTotal = ok_item_#_shipping + ok_item_#_shipping2 * (ok_item_#_quantity -1);
15
ok_item_#_shipping2 Optional The cost of shipping for each additional item. 15
ok_item_#_tax Optional Used only when the merchant applies a tax charge for a specific item. 15
ok_item_#_custom_1_title Optional Custom field 1 title as passed by you, the merchant. 127
ok_item_#_custom_1_value Optional Custom field 1 value as entered by your customer or as passed by you, the merchant. 127
ok_item_#_custom_2_title Optional Custom field 2 title as passed by you, the merchant. 127
ok_item_#_custom_2_value Optional Custom field 2 value as entered by your customer or as passed by you, the merchant. 127

Payer information

If this information is provided, it will be used to pre-fill the appropriate fields of the registration form for the new OKPAY client.

General

ok_payer_first_name Optional Customer’s first name. 64
ok_payer_last_name Optional Customer’s last name. 64
ok_payer_business_name Optional Customer’s company name, if the customer is a business. 127
ok_payer_email Optional Customer’s email address. 127
ok_payer_phone Optional Customer’s telephone number. 20

Address

ok_payer_country_code Optional ISO 3166 country code associated with customer’s address. 2
ok_payer_country Optional Country of customer’s address. 64
ok_payer_city Optional City of customer’s address. 40
ok_payer_state Optional State/province of customer’s address. 40
ok_payer_street Optional Customer’s street address. 200
ok_payer_zip Optional Zip/postal code of customer’s address. 20

Extra information

ok_return_success Optional The URL to which the payer’s browser is redirected after completing the payment; for example, a URL on your site that displays a “Thank you for your payment” page. By default the browser is redirected to an OKPAY web page. 127
ok_return_fail Optional A URL to which the payer’s browser is redirected if payment is cancelled; for example, a URL on your website that displays a “Payment Canceled” page. By default the browser is redirected to an OKPAY web page. 127
ok_ipn Optional The URL to which OKPAY posts information about the transaction, in the form of Instant Payment Notification messages. 127
ok_language Optional The language of the login or sign-up page for a payer. If unspecified, the language is determined by an OKPAY cookie in the customer’s browser. If there is no OKPAY cookie, the language is selected automatically by IP address or browser language.


Auto Return URLs

With Auto Return, your customers are redirected back to your site immediately after clicking the Pay button on the Payment Confirmation page.
Auto Return applies to all OKPAY website payments, including Buy Now, Donations, Subscriptions, and Shopping Cart.
Your customers enjoy a streamlined checkout experience and are returned back to your site quickly!

How Auto Return works

Auto Return URLs

Setting up Auto Return

To set up Auto Return:
  1. Log in and click on Profile under My Account.
  2. Click the Wallets and Currencies link under Account preferences.
  3. Choose a wallet for which you want to set up Auto Return and click Properties.
  4. In wallet properties click on the Integration tab.
  5. Enter the success and fail Return URLs.

Return URL requirements

The following is required to set up Auto Return.

Success URL

In accordance with the user agreement, you must provide verbiage on the page displayed by the Return URL that will help the customer understand that the payment has been made and the transaction has been completed.
You must also provide verbiage on the page displayed by the Return URL that explains that the payment details will be emailed to the buyer.
Example: Thank you for your payment. Your transaction has been completed and a receipt for your purchase has been emailed to you. You can log in to your account at www.okpay.com to view the details of this transaction.

Fail URL

This is the URL address of a web page that the customer will be redirected to by OKPAY if he cancels his payment or the payment fails.

Variables passed to Auto Return URLs

To inform the customer about the operation, your Auto Return pages can use the same variables as those received by the IPN listener.
Please note you should not use Auto Return pages for any purpose other than informing users about the success or failure of the transaction because in some situations these pages may not be called. For example, the user can close the window immediately after payment. Conversely, an IPN URL is always called so all the necessary post-purchase procedures will be performed.

Overriding return URLs for specific payments

The Return URLs will be applied to all payments to a certain wallet unless otherwise specified in the button/link code for a particular payment. You can change a Return URL by editing it in the Wallet Properties; alternatively, you can modify the HTML code (the variables ok_return_success and ok_return_fail) associated with a button or link. In this latter case, the Return URL associated with the button or link will override that specified in the Wallet Properties.

Code Samples

Refer to the following page for additional code samples information, clarifications and examples. Please note that you can use payment form not only the way it is presented, but also combine required variables and create your own custom payment form.

Basic

Basic payment form is the simpliest way to sell any sort of a digital good or get paid for a service. For example we will use it to sell OKPAY Poster.
The form contains only minimum required variables such as "ok_item_1_name"; "ok_item_1_price"; "ok_currency".
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Basic with Invoice

Basic with Invoice payment form works the same way as a Basic form except that you can also add a custom invoice number to the operation. Invoice number can be used to identify the order in the Merchant's system. For example Invoice number "99999" will be assigned to OKPAY Poster.
Invoice variable "ok_invoice" is added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_invoice" value="99999"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Several Items

Several Items payment form is usefull for selling more than one product. This is a required feature for online stores with a "Shopping Cart". Buyer will pay for several items within a single payment operation.
Additional Item variables "ok_item_N_name"; "ok_item_N_price"; "ok_item_N_article" are added to the payment form;
where N is an item number.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_item_1_article" value="555"/>
   <input type="hidden" name="ok_item_2_name" value="Robot"/>
   <input type="hidden" name="ok_item_2_price" value="50"/>
   <input type="hidden" name="ok_item_2_article" value="777"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Items Quantity

Items Quantity payment form allows Merchant to specify the quantity of the product. For example Quantity "3" will be assigned to OKPAY Poster.
Quantity variable "ok_item_1_quantity" is added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_item_1_quantity" value="3"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Shipping

Shipping payment form is required for Merchants selling tangible goods. Buyer will need to login to OKPAY account, select a payment method and then enter a Shipping address.
Shipping variable "ok_item_1_shipping" is added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_item_1_type" value="shipment"/>
   <input type="hidden" name="ok_item_1_shipping" value="10"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Taxes and Handling

Taxes and Handling payment form includes shipping, handling and sales tax information. Merchants selling tangible goods besides asking for a Shipping address information can also include handling and sales tax charges in total price. Buyer will need to login to OKPAY account, select a payment method and then enter a Shipping address.
Shipping variable "ok_item_1_shipping"; "ok_item_1_handling"; "ok_item_1_tax" is added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_item_1_shipping" value="10"/>
   <input type="hidden" name="ok_item_1_handling" value="7"/>
   <input type="hidden" name="ok_item_1_tax" value="3"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Payment Argument

Argument payment form assumes additional information input field. Merchant can create custom information box on the checkout page to request additional information from a client: account number, transfer number, order details, etc. It will feature as required field in order to complete payment operation.
Payment Argument variable ""ok_item_1_custom_1_title" with a value "Description" are added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_item_1_custom_1_title" value="Description"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Custom Payment Arguments

Custom Arguments payment form allows Merchant to add his own custom variables. Merchant can create custom information rows on the checkout page with additional information: description, order details, customer info, etc.
Payment Argument variable ""ok_item_1_custom_1_title" with a value "Description" and ""ok_item_1_custom_1_value" with a value "OKPAY Company promo wall poster" are added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_item_1_custom_1_title" value="Description"/>
   <input type="hidden" name="ok_item_1_custom_1_value" value="OKPAY Company promo wall poster"/>
   <input type="hidden" name="ok_item_1_custom_2_title" value="Size"/>
   <input type="hidden" name="ok_item_1_custom_2_value" value="A1 Poster"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Custom Price

Custom Price payment form is an ideal options for Merchant that offer Buyer to pay as much as he want. It is a perfect solution for Donation purposes. Buyer will need to manually enter the amount he desires to pay.
Please note that there is no additional variable required. You just need to remove the "ok_item_1_price" variable from the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Commission on Buyer

Commission on Buyer payment form specifies that a Buyer will be paying transaction fee. Buyer will see the total product/service price and the amount he will need to pay with each of the payment options. This amount will include total price plus transaction fee.
Commission variable "ok_fees" with a value "1" is added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_fees" value="1"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Custom Payment Options

Custom Payment Options payment form is very usefull for a Merchant that wants to accept only certain payment instruments for the specific product/service. Buyer can only use OKPAY e-currency and specified by a Merchant payment methods to pay for an item. For example we will only accept Credit Cards and Sofort.
Shipping variable "ok_paysystems" is added to the payment form. Custom values determine which payment methods will be available during checkout.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_paysystems" value="CC SF"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now

Direct Payment Processing

Direct Payment Processing form can be used to skip review and checkout page. Merchant can forward Buyer directly to the particular Payment System processing page bypassing the OKPAY checkout page. Please note that Buyer will no longer be able to use other than specified payment method. For example we will select Sofort direct processing.
Direct Payment Processing variable "ok_directdeposit" with a custom payment method value are added to the payment form.
Additional variables description can be found on the Variable Reference page.
<form  method="post" action="https://www.okpay.com/process.html">
   <input type="hidden" name="ok_receiver" value="OK702746927"/>
   <input type="hidden" name="ok_item_1_name" value="OKPAY Poster"/>
   <input type="hidden" name="ok_item_1_price" value="100"/>
   <input type="hidden" name="ok_currency" value="USD"/>
   <input type="hidden" name="ok_directdeposit" value="SF"/>
   <input type="image" name="submit" alt="OKPAY Payment" src="https://www.okpay.com/img/buttons/x02.gif"/>
</form>
Click on the "Buy Now" button below to view checkout page example in action.
buy now


OKPAY Seal

Use the OKPAY seal to present yourself to the Internet community.
Place the seal on your website so the visitors can click on it and see public information about yourself which is verified by OKPAY. Generally, if someone wants to know more about you, it means they are prepared to deal with you. This situation is similar in principle to presenting your credentials to a prospective business partner prior to negotiating a deal.

Images you can use

Click here to verify Click here to verify Click here to verify Click here to verify

Putting an OKPAY seal on your website

To place the programmed graphic on a web page, log in to your account and go to Profile -> Merchant -> OKPAY Seal where you will find the seal code generator along with detailed instructions on how to embed the code in your website.

Instant Payment Notification (IPN)

Instant Payment Notification (IPN) is OKPAY's messaging service that sends out transaction-related notifications. Once IPN is integrated, sellers do not have to wait for actual payments to come in, thus being able to better automate their back office.
IPN can notify of these transaction-related events:
  • Instant payments.
  • Pending payments.
  • Recurring payments and subscriptions.
  • Authorizations.
  • Disputes, chargebacks, reversals, and refunds.
As OKPAY’s interface for handling purchase confirmations and server-to-server communication, IPN can also be used to manage and customize a variety of APIs and data-retrieval tasks, which will allow you to:
  • Customize your website's response to customer purchases in seconds.
  • Track customers via IPN "pass-through" variables.
  • Notify online sellers who mostly deal in software downloads and other digital goods.
  • Track affiliate sales and commissions.
  • Store transaction information in your own database.
Learn more:

Implementing an IPN Listener

You write your IPN listener in the scripting or programming language of your choice and host it on your web server. You can use sample code provided by OKPAY as a starting point.
As a good programming practice, as well as to keep things simple, your IPN listener should listen for a post from OKPAY and dispatch it immediately to another routine or process that handles the business logic associated with the message. If your listener is structured in this way, it will be a simple and tight loop that listens for a message and dispatches it for processing by your application logic.
Your listener software must:
  1. Wait for an HTTP post from OKPAY.
  2. Create a request that contains exactly the same IPN variables and values preceded with ok_verify=true
  3. Post the request to okpay.com/ipn-verify.html
  4. Wait for a response from OKPAY, which is either VERIFIED or INVALID (for IPN simulation testing response may be TEST or INVALID).
  5. If the response is VERIFIED, perform the following checks:
    • Confirm that the payment status is Completed (ok_txn_status=completed).
      OKPAY sends IPN messages for pending and denied payments as well; do not ship until the payment has cleared.
    • Use the transaction ID (ok_txn_id) to verify that the transaction has not already been processed, which prevents duplicate transactions from being processed.
      Typically, you store transaction IDs in a database so that you know you are only processing unique transactions.
    • Validate that the receiver’s email address (ok_receiver_email) is registered to you.
      This check provides additional protection against fraud.
    • Verify that the price, item description, and so on, match the transaction on your website.
      This check provides additional protection against fraud.
  6. If the verified response passes the checks, take action based on the value of the ok_txn_status variable; otherwise, take action based on the value of the ok_txn_pending_reason variable.
  7. If the response is INVALID, save the message for further investigation.

Sample test listeners

Here you can find sample test listeners written using different popular programming languages.

PHP Sample listener in PHP

C# Sample listener in C#

Visual Basic Sample listener in VB

Perl Sample listener in Perl

Java/JSP Sample listener in Java/JSP

Python Sample listener in Python

 

IPN Operations on OKPAY

The IPN History page on OKPAY provides additional information to help you troubleshoot IPN messaging. You can use it to determine the status of IPN messages and resend them if necessary.

Accessing IPN History

Log in to the OKPAY then select Profile -> Merchant -> Test Tools -> IPN History.

Using IPN History

Use the IPN History page on OKPAY to view IPN messages sent to you from OKPAY and request that messages be resent. You can locate IPN messages for a specific wallet by their date range, delivery status and related OKPAY transaction.
IPN Search The search results contain the following information:
  • The date and time that OKPAY created the IPN message.
  • Whether this IPN message was the original message or whether it was resent, which is indicated by the asterisk (*) in the Date/Time (created) column.
  • The IPN message ID assigned by OKPAY.
  • The current status which is one of the following values:
    • Sent indicates that OKPAY sent the message to your IPN listener.
    • Failed indicates that OKPAY did not receive an acknowledgement of the message.
    • Queued indicates that OKPAY is ready to send the message.
    • Retrying indicates that the message has been resent between 1 and 15 times and OKPAY continues trying to resend the message (every 30 minutes).
  • Your server’s response to HTTP POST that delivered the IPN message to your listener. For more information about these codes, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1.
  • If the message was in connection with an OKPAY transaction, you will see the ID of the OKPAY transaction associated with the message.
To see more information about an IPN message, click on the message ID. An IPN details page will appear:
IPN Details
In addition to the information on the IPN History page, the details contain the following:
  • Whether this IPN message was the original message or was resent (the No. of retries field, the original message has 1 here).
  • Last time the message was resent.
  • The URL on which your listener is running.
    Note:You cannot change the URL; if you request OKPAY to resend an IPN message, it is sent to this URL.
  • The number of retries before the message has been successfully acknowledged
  • The type of IPN message.
  • All the parameters sent to your IPN listener.

Resending IPN Messages

You can use the IPN History page to request that OKPAY resend an IPN message. You can search the IPN message history for the messages that may need to be resent and then click the appropriate link to resend them.
After a message has been sent, OKPAY notifies you that the messages have been resent and updates the status.
When the message has been sent, your server’s response to the HTTP POST is used to update the HTTP response code field. A value of 200 indicates that your server successfully received the IPN message. Other values typically indicate a server configuration error for the server that hosts your IPN listener. For more information about these codes, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1. If you do not see a response code, check if your server is running.

Identifying Your IPN Listener to OKPAY

After you implement and test your IPN listener, you make your listener known to OKPAY by specifying the listener’s URL in your account’s profile. Each wallet can be configured separately. Optionally, you can override the URL to specify another listener for specific payments.

Presenting Your IPN Listener to OKPAY

After you implement and test your IPN listener, you associate the listener with a specific wallet in OKPAY. To do this, follow these steps:
  1. Log in and click on Profile under My Account.
  2. Click the Wallets and Currencies link under Account preferences.
  3. Choose a wallet for which you want to set up IPN and click Properties.
  4. In Wallet Properties click on the Integration tab.
  5. Click Enable IPN to receive notification messages in your listener.
  6. Specify your listener’s URL in the Payment Notification (IPN) URL field and click Save to activate it.
Your listener must be located at the URL that you specify in the profile. Before you activate your listener on OKPAY, you should test the listener using the IPN simulator.

Disabling IPN Notifications

To disable your listener uncheck Enable IPN in wallet preferences.

Dynamically Setting the Notification URL

You can specify an IPN listener for a specific payment. In this case, OKPAY sends the IPN message to the listener specified in the notification URL for a specific button or API operation instead of the listener specified in Wallet Properties.
To specify a notification URL:
For a/an ... specify your IPN Listener’s URL in the ...
button or link ok_ipn HTML form variable
Note: The IPN message will always be sent to your notification URL unless receiving IPNs has been disabled. Even if you have not enabled receiving IPN messages in your Profile or have reset your preferences by turning off IPN messages, OKPAY still sends IPN messages to the notification URL you have specified for a particular payment.

IPN Testing

After you implement your listener and start it running on your web server, you can use the IPN simulator in the Test Tools to send IPN messages to the URL at which your listener is running. This tool allows you to verify that you are receiving IPN messages correctly.

Testing Your Listener

The first level of testing is to ensure that your IPN listener receives messages and handles them appropriately. This level of testing requires you to have your IPN listener running at your notification URL; however, it does not require you to set up the listener in wallet properties.
You must be logged into the OKPAY to use the IPN Simulator. To set up and send an IPN message using the simulator.
  1. In Profile -> Merchant -> Test Tools -> IPN Simulator.
  2. Select wallet from drop-down, then enter the URL to receive the notification and the kind of notification you want to test on the following screen:
    IPN Simulator
    When you select the kind of transaction that you want to test and click Next, a form containing test data appears:
    IPN Sumulator Form
  3. Keep or modify the values of fields that you want to include in the IPN. The simulator does not check the validity of fields that you change.
  4. Click Send Test IPN. The IPN message is sent to the specified URL and the results of the operation are displayed at the top of the page.
If your IPN listener receives a message, you know that it is properly installed on your web server. The default messages sent by the IPN simulator are valid, thus, if your listener responds correctly to the message, it should receive a TEST message (for real messages you will receive VERIFIED). If you do not receive any message or if you receive an INVALID message after responding to the original message from OKPAY, you will need to troubleshoot your listener.

IPN Troubleshooting Tips

IPN failures fall into three categories: not receiving any IPN messages from OKPAY, receiving some but not all IPN messages, and receiving INVALID messages from OKPAY after responding to a message.
If you do not receive any IPN messages from OKPAY
  • Check the IPN History page on OKPAY. It tells you whether OKPAY sent the IPN message and whether your listener responded to it. It may also provide information about the status of the server on which your listener is running. If necessary, from this page you can also request that OKPAY resend the IPN message.
  • Check that the path to your IPN listener is correct and you are using that path correctly in your IPN notification URL; for example, the file path is often similar to, but not the same as, the URL.
  • Verify that your firewall settings are not blocking HTTP POST messages from OKPAY.
  • If the logs for your web server are available, check the logs to confirm that messages are being sent to your web server and check for any errors that may have occurred.
If you receive some messages but not others
  • Verify that your IPN listener is responding to all messages, even those you do not intend to process.
If you receive an INVALID message
  • Check that your are posting your response to the correct URL, which is https://www.okpay.com/ipn-verify.html
  • Verify that your response contains exactly the same IPN variables and values in the same order, preceded with ok_verify=true.
  • Ensure that you are encoding your response string and are using the same character encoding as the original message.
Note: If you receive multiple IPN messages for the same transaction or if messages appear to be out of order, this is not necessarily an indication that your listener is malfunctioning. For example, if you do not respond in time, OKPAY resends the message. You should investigate these situations; however, because they could be caused by a logic errors or performance problems as well.

IPN Variable Reference

OKPAY returns certain variables with every IPN message. Not all variables listed below may always be returned.

Variables with Enumerable Values

Transaction Kind

Typically, your back-end or administrative processes will perform specific actions based on the IPN message received. You can use the ok_txn_kind variable in the message to trigger the processing you want.
Transaction Kind (ok_txn_kind) Description
mass_pay Payment received; the source is the OKPAY Mass Payment option.
send_money Payment received; the source is the OKPAY Send Money option.
payment_link Payment received; the source is an OKPAY Payment Link or Button.
marketplace Payment received; the source is the OKPAY Marketplace.

Transaction Payment Type

Use the ok_txn_payment_type variable in the message to learn how this operation was performed.
Payment Type (ok_txn_payment_type) Description
instant This payment was funded with an OKPAY account balance or instant transfer.

Transaction Status

Use the ok_txn_status variable in the message to learn the status of the payment. You would apply different processing depending on status values below.
Transaction Status (ok_txn_status) Description
completed The payment has been completed and the funds have been added successfully to your account balance.
failed The payment has failed.
pending The payment is pending. See ok_txn_pending_reason for more information.
reversed The payment has been reversed.

Transaction Pending Reason

The ok_txn_pending_reason variable provides additional information about transactions with ok_txn_status = pending.
Pending Reason (ok_txn_pending_reason) Description
review The payment is pending while it is being reviewed by OKPAY for risk.
unilateral The payment is pending because it was made to an email address that is not yet registered or confirmed.
verify The payment is pending because you are not yet verified. You must verify your account before you can accept this payment.
other The payment is pending for a reason other than those listed above. For more information, contact OKPAY Customer Service.

Transaction Reversal Reason

In the case of a transaction with ok_txn_status = reversed use the ok_txn_reversal_reason variable in the message to learn the cause of the reversal. Note: Additional codes may be returned.
Reversal Reason (ok_txn_reversal_reason) Description
other Non-specified reason.
refund A reversal has occurred on this transaction because you have given the customer a refund.
chargeback This transaction has been reversed due to a chargeback issued by the initial payment processor.

Item Types

Type of items sold.
Item Types (ok_item_#_type) Description
shipment Tangible goods
digital Digital products
service Services
donation Donations

Transaction and Notification-Related Variables

Transaction and notification-related variables provide additional characteristics of the merchant who is receiving the payment or other notification and transaction-specific information.
Variable Name Description Characters
Length

General information

ok_charset Character set. Always UTF-8. 20
ok_ipn_test Whether the message is a test message. If its value is greater than zero, it is a test message. 13
ok_ipn_resend Whether this IPN message was resent (if equals true, otherwise it is the original message). 1

Receiver information

ok_receiver For transactions where Operation Kind is payment_link or shopping_cart, this variable will have the same value as that of its namesake in the Payment Links and Buttons API. 127
ok_receiver_email Email address of the payment recipient (that is, the merchant).
Note: The value of this variable is normalized to lowercase characters.
127
ok_receiver_phone Phone number of the payment recipient (that is, the merchant). 127
ok_receiver_id Unique account ID of the payment recipient (i.e. the merchant). This is the same as the recipient's referral ID. 13
ok_receiver_wallet Payment recipient’s wallet ID. 24

Buyer Information Variables

Buyer information identifies the buyer or initiator of a transaction by payer ID, email address or cellphone number. Additional contact or shipping information may be provided.
Variable Name Description Characters
Length

Basic Information

ok_payer_first_name Customer’s first name. This field will read "Anonymous" for anonymous users. 64
ok_payer_last_name Customer’s last name. This field will read "Anonymous" for anonymous users. 64
ok_payer_business_name Customer’s company name, if the customer is a business. 127
ok_payer_email Customer’s email address. 127
ok_payer_phone Customer’s telephone number. 20
ok_payer_id Unique customer account ID. 13
ok_payer_reputation Payer business score - payer reputation number. 5
ok_payer_status Whether the customer has a verified OKPAY account.
  • verified – Customer has a verified OKPAY account.
  • unverified – Customer has an unverified OKPAY account.
20

Address Information

ok_payer_country_code ISO 3166 country code associated with customer’s address. 2
ok_payer_country Country of customer’s address. 64
ok_payer_city City of customer’s address. 40
ok_payer_state State/province of customer’s address. 40
ok_payer_street Customer’s street address. 200
ok_payer_zip Zip/postal code of customer’s address. 20
ok_payer_address_name Name used with address. 128
ok_payer_address_status Whether the customer provided a confirmed address. It is one of the following values:
  • confirmed – Customer provided a confirmed address.
  • unconfirmed – Customer provided an unconfirmed address.
20

Payment Information Variables

Payment information identifies the amount and status of a payment transaction, including fees.
Variable Name Description Characters
Length

General transaction-related variables

ok_txn_id The merchant’s original transaction identification number. 19
ok_txn_parent_id In the case of a reversal this variable contains the ok_txn_id of the original transaction, while ok_txn_id contains a new ID for the new transaction. 19
ok_txn_datetime Time/Date stamp generated by OKPAY, in the following format: YYYY-MM-DD HH:MM:SS 19
ok_txn_kind The kind of transaction for which the IPN message was sent. 40
ok_txn_payment_type How this operation was performed. 40
ok_txn_status The status of the payment. 40
ok_txn_pending_reason This variable is set only if ok_txn_status = pending. View list of possible pending reasons. 40
ok_txn_reversal_reason This variable is set if ok_txn_status = reversed. View list of possible reversal reasons. 40
ok_txn_currency The currency of the operation. ISO 4217 3-letter code. 3
ok_txn_exchange_rate Exchange rate used if a currency conversion occurred. 10
ok_txn_gross Full amount of the customer's payment, before transaction fee is subtracted. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction. The total ok_txn_gross is the sum of ok_item_x_gross (where x is the shopping cart detail item number). 15
ok_txn_net Amount of the customer's payment, with subtraction of transaction fee. 15
ok_txn_fee Transaction fee associated with the payment. ok_txn_gross minus ok_txn_fee equals the amount deposited into the ok_receiver_email wallet/account. If this amount is negative, it signifies a refund or reversal, and either of those payment statuses can be for the full or partial amount of the original transaction fee. 15
ok_txn_handling Total handling amount associated with the transaction.
Format: unsigned, no currency symbol, two decimal places.
15
ok_txn_shipping Total shipping amount associated with the transaction. Shipping charges associated with this transaction.
Format: unsigned, no currency symbol, two decimal places.
15
ok_txn_shipping_method The buyer selected the named shipping method for this transaction. 64
ok_txn_tax Amount of tax charged on payment.  
ok_txn_comment Memo as entered by your customer in OKPAY comment field. 255
ok_invoice Passthrough variable you can use to identify your Invoice Number for this purchase. If omitted, no variable is passed back. 127

Item-related variables (for SCI, Payment Links & Buttons, and Marketplace transactions)

If this is a shopping cart transaction, OKPAY will append the number of the item (e.g., ok_item_1_name, ok_item_2_name, and so forth).
ok_items_count If this is an OKPAY Shopping Cart transaction, number of items in cart. 2
ok_item_#_id On Marketplace purchase this is ID of an OKPAY Marketplace item. 19
ok_item_#_name Item name as passed by you, the merchant. Or, if not passed by you, as entered by your customer. 127
ok_item_#_article Pass-through variable for you to track purchases. It will get passed back to you at the completion of the payment. If omitted, no variable will be passed back to you. 40
ok_item_#_type One of item types. 64
ok_item_#_quantity Quantity as entered by your customer or as passed by you, the merchant. 8
ok_item_#_gross The item gross amount is in the currency of ok_txn_currency. The ok_item_x_gross amount is the sum of ok_item_x_price + ok_item_x_handling + ok_item_x_shipping + ok_item_x_tax. 15
ok_item_#_price The item price without shipping, handling, and/or tax fees. 15
ok_item_#_handling The handling x variable is only shown when the merchant applies a handling amount for a specific item. The sum of handling x is equal to ok_txn_handling. 15
ok_item_#_shipping The shipping x variable is only shown when the merchant applies a shipping amount for a specific item. The sum of shipping x is equal to ok_txn_shipping. 15
ok_item_#_tax The tax x variable is included only if there was a specific tax amount applied to a particular shopping cart item. The sum of tax x is equal to ok_txn_tax. 15
ok_item_#_custom_1_title Custom field 1 title as passed by you, the merchant. 127
ok_item_#_custom_1_value Custom field 1 value as passed by your client. 127
ok_item_#_custom_2_title Custom field 2 title as passed by you, the merchant. 127
ok_item_#_custom_2_value Custom field 2 value as passed by your client. 127

OKPAY SOAP API Overview

The OKPAY SOAP API provides programmatic access to OKPAY features and services.
Developers can build custom applications, tools, and services that correspond to the same services and tools available through the main OKPAY website, https://www.okpay.com/. Typical applications include searching for transactions, paying en masse, and making refunds. The API is based on open standards known collectively as “Web Services” which include the Simple Object Access Protocol (SOAP), Web Services Definition Language (WSDL), and the XML Schema Definition language (XSD). These standards are supported by a wide range of development tools on a variety of platforms.
OKPAY uses SOAP version 1.1.

OKPAY Service Location

The OKPAY Web Services schema base and core components are required for developing applications to work with the OKPAY Web Services API. The following is the location of the WSDL and XSD files: https://api.okpay.com/OkPayAPI

How SOAP API works

Like many web services, OKPAY SOAP is a combination of client-side and server-side schemas, hardware and software servers, and core services.
Figure 1. OKPAY SOAP High-level Diagram
SOAP API Diagram
In an object-oriented processing model, the interface to SOAP requests/responses is an object in your application’s native programming language. Your third-party SOAP client generates business-object interfaces and network stubs from OKPAY-provided WSDL and XSD files that specify the OKPAY SOAP message structure, its contents, and the OKPAY API service bindings. A business application works with data in the form of object properties to send and receive data by calling object methods. The SOAP client handles the details of building the SOAP request, sending it to the OKPAY service, and converting the response back to an object.

Operations that can be performed via OKPAY API

API supports the following operations.
  • General. General-purpose functions: get server time, verify if an account exists in the system, etc.
  • Transfers. Moving funds from one account to another. With this command you can transfer funds in any of the OKPAY-supported currencies.
  • History. Requesting history of a specified wallet. Additional parameters can be used such as date range, currency, destination account, etc. This function is also necessary if you wish to receive information about specific transactions.
  • Balance. Wallet balance requests. Get a wallet's balance in all currencies or return the balance of a specified currency.

Authentication

An API call must always contain information that will let the API server to authenticate the calling user. This call will contain a Wallet ID and other information that will help the server to accurately identify the user submitting the request. Every server request to API must contain the following authentication information:
  • WalletID. This is a wallet which has enabled API access and which the user wishes to query.
  • SecurityToken. This parameter consists of a hashed line of text formed by concatenating the API’s access password and UTC date.

Creating a security token

To create a security token, use the following procedure.
  • Apply concatenation to obtain the following line:
    Access Password:Date UTC in YYYYMMDD format:Time UTC in HH format.
  • Do a hash of the above line by SHA256. For example, if API access password = MyApiPass and UTC date = 2010-06-01 15:30 (24h format)
    Concatenation of parameters: MyApiPass:20100601:15  
    
    SHA256 hash of the above line:
    5950F9BDA723ECDF9859AD205412BB44E0DAB16630CA4462490DE64B02305F8D

Security

The OKPAY SOAP API service is protected to ensure that only authorized OKPAY members can use it. There are three levels of security:
  1. A required API username (WalletID) and an API security token;
  2. Secure Sockets Layer (SSL) data transport;
  3. Access filtering by IP address in the wallet's settings.
An authentication failure at any of these levels denies access to the OKPAY SOAP API service.

OKPAY Account (Wallet) Preparation

Each wallet has it's own API access settings. I.e. access settings can be entered, enabled or disabled for each particular wallet separatelly.
Follow steps listed below to start working with our API:
  1. Login to your OKPAY account, click on needed wallet title under “Wallets and Currencies" section. Then, in wallet properties page click on “Integration” tab.
    Scroll down to "API Access" and provide required information, such as:
  2. Check "Enable API";
  3. Provide strong enough "Access Password". This password will be used in every request as a part of authentication process.
  4. Click Save;
  5. Check "Enable API Security" and provide IP address of your server that you authorize to make requests for your API from. You may leave it blank if you do not wish to restrict access by IP address.

General API Definitions

OKPAY has made some schema design decisions that can affect how businesses design their own applications.
  • Enumerations: Enumerations are defined directly in the OKPAY API schema.
  • Troubleshooting information: The OKPAY API returns information about elements that trigger errors.
  • Backward compatibility: The OKPAY API is versioned so that business applications are backward compatible when new elements are introduced to the server-side schema.

Character Encoding

The OKPAY SOAP API service assumes that all data in SOAP requests is in Unicode, specifically, the Unicode (or UCS) Transformation Format, 8-bit encoding form (UTF-8). In SOAP responses, the service always returns data in UTF-8.

Data formats

This table lists types and format of data utilized by OKPAY API.
Data Type Format Examples
ID Line of text, up to 20 characters long (varchar(20)) 54321
12345678901234567890
Account ID xxxxxxxx up to 9 characters long 123456789
987654321
Wallet ID OKxxxxxxxxx up to 11 characters long OK123456789
OK987654321
Amount
All currency amount fields have the following structure:
  • The amount must have two decimal places.
  • The decimal separator must be a period (“.”).
  • You must not use any thousands separator.
1.26
456.78
Date YYYY-MM-DD HH:mm:SS 2010-12-31 10:33:44
2005-06-07 01:02:03
Transaction ID Very long number (64-bit integer) 1234567890
9994456683762355345868
Currency Currency is listed in of the following formats:
  • USD (OKPAY, USD)
  • EUR (OKPAY, EUR)
USD, EUR, etc.
See the list of currency codes.

Error codes

Error Code Name Error Text Description

General Errors

101 API_Disabled API is currently disabled API services is temporarily turned off
102 API_Function_Disabled API function is currently disabled This API function is temporarily unavailable. Please try later.
103 Invalid_IP_Address Invalid requesting IP address Requesting IP address is not contained in API entry's allowed address list
104 Authentication_Failed Authentication error This error is a result of incorrect API access password, name of API or incorrect hash string for security token.
105 Account_API_Disabled
API entry is disabled Account's API entry is disabled
106 Access_Denied Access Denied An attempt to query data to which access from this account is not allowed
107 Source_Account_Blocked Source account blocked Source account is blocked by administration
108 Target_Account_Blocked Target account blocked Destination account is blocked by administration
109 Source_Account_Doesnt_Exist Source account doesn't exist Source account doesn't exist
110 Target_Account_Doesnt_Exist Target account doesn't exist Target account doesn't exist
111 Transaction_Not_Found Transaction not found You're requested information about transaction that can't be found
112 Currency_Disabled Currency disabled Specified currency is disabled
113 Internal_Error Internal error Internal system error

Validation Errors

200 Currency_Not_Found
Currency not found Currency code not found or invalid currency code specified
201 Incorrect_Amount Incorrect Amount Non-properly formatted, negative, to big or to small amount (min amount is 0.01)

Payment Errors

300 Insufficient_Funds Insufficient funds Source account has insufficient funds to complete transaction
301 Limits_Exceeded
Daily amount limit exceeded Total daily amount of transfers is exceeded
302 Cannot_Pay_Self Cannot pay self. The transaction was refused because you cannot send money to yourself.

API Functions

API functions allows you to transfer funds, view transaction history, check available balance, etc. Click on the function to get detailed description and an example.

General Functions

Function Description
Get_Date_Time Returns current server GMT Time
Wallet_Get_Balance Returns account balance for all currencies
Wallet_Get_Currency_Balance Returns wallet balance for requested currency
Send_Money Transfer money
Transaction_Get Returns transaction information by transaction ID
Transaction_History Returns transaction history for selected period
DebitCard_Prepay Pre-order OKPAY Debit Card for multiple recipients

Extended Functions

Fully verified merchants also have access to Extended API features (start with EX) upon contacting Support Service.
Function Description
EX_Account_Check Search for OKPAY account by WalletID / Email / Phone
EX_Client_Register Register client in OKPAY
EX_Image_Upload Upload images for a client

Data Structures

See data structures


Code Samples

Here you can find a few examples of OKPAY API usage written in different popular programming languages.

PHP Sample in PHP

C# Sample in C#

Visual Basic Sample in VB

Perl Sample in Perl

Java/JSP Sample in Java/JSP

Python Sample in Python

 

Currency Codes

OKPAY-Supported Currencies and Currency Codes.
Country Currency ISO-4217 Code
Euro Member Countries, Andorra, Austria, Azores, Baleares (Balearic Islands), Belgium, Canary Islands, Cyprus, Dutch (Netherlands), Eire (Ireland), Finland, France, French Guiana, French Southern Territories, Germany, Greece, Guadeloupe, Holland (Netherlands), Holy See, (Vatican City), Ireland (Eire), Italy, Luxembourg, Madeira Islands, Malta, Martinique, Mayotte, Miquelon and Saint Pierre, Monaco, Montenegro, Netherlands, Portugal, Réunion, Saint Pierre and Miquelon, Saint-Martin, San Marino, Slovakia, Slovenia, Spain Euro EUR
United States of America, American Samoa, American Virgin Islands, British Indian Ocean Territory, British Virgin Islands, Caicos and Turks Islands, Ecuador, El Salvador, Guam, Haiti, Mariana Islands (Northern), Marshall Islands, Micronesia (Federated States of), Midway Islands, Northern Mariana Islands, Palau, Panama, Puerto Rico, Samoa (American), United States Minor Outlying Islands, Wake Island U.S. Dollar USD
Britain (United Kingdom), South Georgia, South Sandwich Islands Pound Sterling GBP
Switzerland, Liechtenstein Swiss Franc CHF
Australia, Christmas Island, Cocos (Keeling) Islands, Heard Island and McDonald Islands, Kiribati, McDonald Islands and Heard Island, Nauru, Norfolk Island Australian Dollar AUD
Poland Polish Zloty PLN
Japan Japanese Yen JPY
Israel Israeli New Sheqel ILS
Denmark, Faroe Islands, Greenland Denmark Kroner DKK
Canada Canadian Dollar CAD
Russia, Tajikistan Russian Rouble RUB
Czech Republic Koruny CZK
Malaysia Malaysian Ringgit MYR
Mexico Mexican Peso MXN
Norway, Svalbard and Jan Mayen Norwegian Krone NOK
New Zealand, Cook Islands, Niue, Pitcairn Islands, Tokelau New Zealand Dollar NZD
Philippines Philippine Peso PHP
Singapore Singapore Dollar SGD
Taiwan Taiwan New Dollar TWD
China Yuan Renminbi CNY
Nigeria Nigeria, Nairas NGN

 

Shop Systems

Easy, customized Shop Systems integration Shopping cart software modules for online stores offer a quick and easy integration process as well as smooth shopping experience for your customers. OKPAY is compatible with the widest range of commercial and open-source shopping carts giving merchants the ultimate choice to setup their business.
Select a shopping cart in the list below and see how simple it is to add OKPAY payment solution to your preferred provider.
If you are unable to find a suitable cart or application for your eCommerce website please send us a Request and we will forward it to our developers network. Our API/SCI (Application Program Interface/Shopping Cart Interface) are always at hand. Merchants can use our program interfaces to automate various tasks (money transfers, actual balance requests, etc.) Refer to Developers section to learn more.

Shop Systems

Easy, customized Shop Systems integration Shopping cart software modules for online stores offer a quick and easy integration process as well as smooth shopping experience for your customers. OKPAY is compatible with the widest range of commercial and open-source shopping carts giving merchants the ultimate choice to setup their business.
Select a shopping cart in the list below and see how simple it is to add OKPAY payment solution to your preferred provider.
If you are unable to find a suitable cart or application for your eCommerce website please send us a Request and we will forward it to our developers network. Our API/SCI (Application Program Interface/Shopping Cart Interface) are always at hand. Merchants can use our program interfaces to automate various tasks (money transfers, actual balance requests, etc.) Refer to Developers section to learn more.