You are here: Demand Partners > Real-time bidding > Bid notifications > Win notifications

Win notifications

Last updated on January 25, 2017

OpenX requires the adoption of the winning price macroFor OpenX, a command enclosed in curly braces {} that dynamically inserts attributes into your HTML or third-party ad creatives and click-through URLs when OpenX serves an ad. Other macros, like from your video player, may have alternate formatting. via the BidResponse.seatbid.bid.adm field to track both impressions and spend.

Note: While you may still use the Bidresponse.seatbid.bid.nurl field, this may lead to discrepancies if not configured properly, and if nurl response time is greater than 80 ms. OpenX will not honor any discrepancy disputes based on nurl.

Ad markup field - auction price macros

You can leverage either {winning_price}, {WINNING_PRICE}, or ${AUCTION_PRICE:OXCRYPT} macros within the BidResponse.seatbid.bid.adm field. These macros will expand to an encrypted value in CPI micros of your account currency. For example, a CPMCost per mille, a pricing method which calculates cost based on the number of impressions (per 1000). of $1 = 1,000 CPI micros = 1,000,000 CPM micros.

Note: The ${AUCTION_PRICE} macro does not work in the adm field. OpenX requires an encrypted version of the macro to be used in the adm field.

Below is an example of the BidResponse.seatbid.bid.adm field with a click URL macro and an ${AUCTION_PRICE:OXCRYPT} winning  price macro appended.

            ...
"adm": "<img src=\"http://imagename.location.com?click={clickurl}&winning_price=${AUCTION_PRICE:OXCRYPT}\"/>",
...

        

For more information, see Macros for Demand Partners.

SSRTB winning price decryption tool

The winning price is passed as unpadded web-safe base-64 encoding (per RFC 3548). You must convert this to standard base-64 encoding and pad the result. The price is decrypted with the encryption key, and the integrity of the price is verified with the integrity bits and the integrity key. Your keys will be supplied during onboarding.

The message format is: init_vector (16 bytes), encrypted_price (8 bytes), integrity (4 bytes)

To see an example of the encryption and decryption of this value, visit this link to a GitHub code example.

You can compile the SSRTBPriceCrypter Tool to decrypt and encrypt {WINNING_PRICE}, {winning_price}, or ${AUCTION_PRICE:OXCRYPT} macros.

Below is an example of how to use the SSRTBPriceCrypter.jar file with the encryption/decryption keys that your PDM provides:

            
$ java -jar SsRtbPriceCrypter.jar
Please enter your encryption key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Please enter your integrity key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
				
Enter 0) to Exit 1) to Encrypt 2) to Decrypt: 1
Please enter the price (in micros) to encrypt: 6090
Encrypted: AAABS6engEx9GHPnypcRzlzv8bBrbE2ISbevew
		
Enter 0) to Exit 1) to Encrypt 2) to Decrypt: 2
Please enter the encrypted string: AAABS6engEx9GHPnypcRzlzv8bBrbE2ISbevew
Price: 6090
				
Enter 0) to Exit 1) to Encrypt 2) to Decrypt: 1
Please enter the price (in micros) to encrypt: 1880
Encrypted: AAABS6epI8Er3WytOd6XudG1dfSmmaaKgMTUlA
				
Enter 0) to Exit 1) to Encrypt 2) to Decrypt: 2
Please enter the encrypted string: AAABS6epI8Er3WytOd6XudG1dfSmmaaKgMTUlA
Price: 1880

        

For more information, see Macros for Demand Partners.

Feedback form