In-App Purchases

In-App Purchases (IAP) allow you to build customized purchase experiences for your apps. Using our dead-simple JavaScript API you can ask the user to make purchases dynamically based on your own requirements.

Adding In-App Products

To enable IAPs in your app, first, you need to define at least one In-App Product for your app,

  1. Go to your Developer Dashboard.
  2. Choose the app you would like to enable In-App Purchases for.
  3. From the dashboard page for the selected app, choose In-App Products.
  4. Select New Product and enter your product's Name, SKU, and Price. Then select Add Product.

In-App Purchases in your app

  1. Add the Outpan JS library to the <head> element of your HTML:

    <script type="text/javascript" src=""></script>
  2. At the desired point in your application, call the OPRequestPayment function to ask for payment from the user:

    OPRequestPayment('SKU-0001', function(resp){
        alert('Payment succeeded.');
        alert('Payment failed.');