Integration Guide

Step 1. Get Familiar

  • Documentation review — 15 minutes
    Learn about the endpoints available on the Modern Pricing API and what a typical request looks like.
    View API Documentation.

Step 2. Price Audit

  • Document pricing mentions — 30 minutes
    Review and document all of the places where you currently hard-code prices on your website. We're happy to help complete this task with you.

Step 3. Create Pricing Plans

  • Create pricing plans — 15 minutes
    We recommend creating four tiers of pricing plans—"low","middle","high", and "ultra"—which correspond to the valid responses from the Modern Pricing API.


Score Plan Price Plan ID
Low $9.99 low_999
Middle $14.99 middle_1499
High $19.99 high_1999
Ultra $29.99 ultra_2999
Unknown $14.99 unknown_1499

Step 4. Implement Modern Pricing

  • Request a score — 15 minutes
    Make a request to score your website visitor. Be sure to pass along the visitor's IP Address at a minimum, and the User Agent for even better results.

  • curl -X POST "" \
    -H "Authorization: Basic your-api-key-goes-here" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{"ip_address":"",
         "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6)"}'

  • Save the score — 30 minutes
    By saving the score to your user record, you'll ensure that the user sees a consistent price for the remainder of their customer journey.

  • # == Schema Information
    # Table name: users
    # id                :bigint(8)
    # first_name  :string
    # last_name  :string
    # email          :string
    # score          :string

  • Add control flow statements on checkout — 30 minutes
    Control flow statements on your checkout page are the final step for changing from static to dynamic pricing. Change the price based on the user's score—it's that simple.

  • // Pseudo code:
    case score
    when 'low'
    when 'middle'
    when 'high'
    when 'ultra'
    when 'unknown'

Step 5. Filter Bot Traffic

  • Filter bot traffic — 30 minutes
    Note: If you integrate with our JavaScript snippet, we've taken care of this for you already.

    We recommend you check to make sure the visitor to your website is not a bot before making a request to Modern Pricing.

    If you skip this step, we still accept your API requests from bot visitors and return the score, "bot". However, this will count against your monthly API request volume.

  • // Pseudo code:
    if User Agent is a bot
      score = 'bot'
    ... request Modern Pricing score

Step 6. Complete Release Checklist

Have you...

  • Documented all the places where you currently mention price information?
  • Created pricing plans that correspond to Modern Pricing scores?
  • Implemented the Modern Pricing API — via our JavaScript snippet or HTTP?
  • Filtered bot traffic requests (not necessary if using our JavaScript snippet)?

If you answered yes to all of these questions, you're ready for release!

Have questions along the way? Contact us.