Paymentwall website uses cookies to store your browsing preferences on your device. However, cookies do not collect personal information.

For more information about how we use cookies, check our cookie policy

Close

Documentation

New Documentation Getting Started API Libraries APIs Checklists Flows Integrations Mobile SDKs Reference Smart TV SDK SpiderPipe Testing Payments
Contacts
If you still have questions regarding integration, please email us at devsupport@paymentwall.com

JSON Offer Feed for Virtual Currency API

Introduction


The JSON Offer Feed for Virtual Currency API extension allows you to receive JSON encoded offers by HTTP/HTTPS request.   

This extension can be activated for your project by request.

 

Widget Call parameters

ParameterRequiredPossible valuesDescriptionExample
key yes hexadecimal, 32 characters long Project key abcdef12345678900987654321abcdef
page no numeric Number of the page to fetch  
uid yes alphanumeric

User's unique identifier

user123, user@mail.com
widget yes alphanumeric

Widget key

w1

user_agent yes alphanumeric

Mobile Os of the targeted user

Other

Android

Windows Mobile

iOS

Blackberry

sign_version yes 2 Version of signature. sign_version=2 needs to be used 2
sign yes hexadecimal, 32 characters long

Request signature. All parameters in request need to be
signed. Refer to signature calculation in Digital Goods API

abcdef12345678900987654321abcdef

user_ip yes IPv4, dotted decimal

IP address of the end-user

255.255.255.255

Response format:

 

{"list":[{

"o_name":"Offer name",

"o_description":"Offer description text",

"o_virtual_currency_formatted":"Offer virtual currency label",

"o_virtual_currency":"Offer virtual currency amount",

"o_url":"Offer url",

"o_icon_url":"Offer media (picture, video, etc) url"},...],

"total_count":Total offer amount,

"pager":{"current":current page number,"total":Total number of offer pages,"prev":previous page number,"next":next page number}}

Example request code:

 

<?php

function generateSignature($params, $secret) {

// work with sorted data

   ksort($params);

// generate the base string

   $baseString = '';

   foreach($params as $key => $value) {

      $baseString .= $key . '=' . $value;

   }

   $baseString .= $secret;

   return md5($baseString);

}

$params = array(

   'key' => 'cd83cbb752c243999f449416c55e2f53',

   'uid' => '218069',

   'widget' => 'mw1',

   'user_ip' => '127.0.0.1',

   'user_agent' => 'iOs',

   'sign_version' => 2,

);

$secret = '4c5ee8a5099ece10b5a43cb3bb6a9e03';

$params['sign'] = generateSignature($params, $secret);

$url = 'https://api.paymentwall.com/api/?'. http_build_query($params);

$offers = json_decode(file_get_contents($url));

?>

 

This page needs JavaScript
Your browser is
not supported anymore.
Please update to the more recent one.
This page needs JavaScript
This page needs JavaScript.
Please enable it in your browser settings and try again.
We use cookies on this website to make your browsing experience better. By using the Paymentwall website you agree to our Cookie Policy.