NativeX offers two ways to redeem currency:
1. Client-Side Events – For each rewarded offer a user completes, we notify you client-side. Use this if you don’t have a server.
Using the RedeemCurrency method within the NativeX SDK is the most common way of redeeming currency. This method informs your app of the currency amount to award the user and displays an alert to the user with the amount of currency they received.
Note: Although the NativeX SDK handles the currency redemption and the display message, you will still need to manage the user’s overall balance and add the new currency they received.
For more information regarding how to implement the RedeemCurrency method, see the Integration Guide:
2. Server-Side Callback- For each rewarded offer a user completes, we notify you server-side. Use this if you have a server.
Another option for currency redemption is to use a Publisher Conversion Postback URL. This puts the entire currency redemption process in your hands. When the user converts on an offer, NativeX sends the currency information to your server via the Publisher Conversion Postback URL. You would then manage the currency redemption within the app. With this option, the NativeX SDK does not handle the currency redemption or the display message.
To setup a Publisher Conversion Postback URL, follow these steps:
Step 1: Create a base URL that directs the information to your server (ex. https://mybaseurl.com).
Step 2: Append the desired macros from the list below, to your base URL. (ex https://mybaseurl.com?AppID=12345&accountId=#PublisherUserId#&amount=#DevicePayoutInCurrency#).
|#RewardId#||This is the unique identifier you assigned to your virtual reward for technical integration. If you are using multiple types of virtual rewards (e.g. Gold Coins and Silver Coins), you will need to pass in #RewardId# to distinguish which reward to give to the user.|
|#iOSIdFA#||Primary iOS Advertising Identifier|
|#AndroidIDFA#||Google’s Advertising Identifier|
|#DeviceId#||NativeX Internal Unique Identifier|
|#DeviceType#||Device Type – Android, iPad, iPhone, iPod|
|#OsVersion#||This is the OsVersion as reported by the device. For example, “7.0.0” or “6.0.2”. This is only available if it is sent to us on CreateSession, AppWasRun or ActionTaken.|
|#PublisherUserId#||Unique Identifier for publishers to identify users, this ID is passed to our system then passed back. This ID is defined in the session call.|
The amount in USD ($) that is paid out to the user (not the currency amount). This is the net amount (after revenue share), not the gross amount.
The amount, in your game currency, that will be paid to the user. This is calculated using the exchange rate you identify and the net payout of the offer (after revenue share).
|#OfferId#||Internal offer identification number.|
|#PublisherSessionId#||Publisher Session Id.|
|#ClientIp#||IP address of the user’s device.|
|#PaymentId#||Unique ID for each currency payment to a user|
|#PublisherAppCategory#||Your apps categories according to the app store. If your app is not linked to the app store then this will be empty.|
|#State#||The two character state abbreviation for the state the user is in.|
|#StateCode#||Numeric state id for the state the user is in.|
|#CountryCode#||The two character abbreviation for the country. Ex. “US” for United States.|
|#CountryName#||The full name of the country. Ex. “United States”.|
|#CountryISOCode#||The 3 digit ISO code for the country. Ex. 840 for US.|
|#AdUnitCategory#||This is the ad unit category. Ex. Video, Featured Alert, Interstitial Image.|
|#UnixTimeStampInSec#||Epoch time stamp of the conversion.|
|#TimeStamp#||Time stamp of the conversion in the format “yyyyMMddHHmmss”.|
|#Nonce#||Numeric value that is guaranteed to be unique.|
If you require key/signature hashing, please refer to our postback hashing guide.
Step 3: Once you have your postback URL complete you can place it in your app set-up by selecting “Monetization”, then “Integrate Monetization”, then select your app from the drop-down. At the bottom of the page you’ll see a button to “Define Conversion Postback URL”
Here’s a screenshot for reference.