Skip to content

Product pricing API

vlad-aleksandrov edited this page Apr 27, 2018 · 4 revisions

Endpoints


GET /psk/product/price/{zip code}?access_token=[partner's access token]

All data transfers conform to HTTP/1.1, and all endpoints require HTTPS.

JSONP support

If request contains callback=[function_name] parameter, the response will be wrapped into JSONP function call: function_name(data structure).

GET /psk/product/price/{zip code}?access_token=[partner's access token]&callback=[callback function name]

Pricing request parameters


Only ZIP code is required for pricing API.

Response


Response contains an array of available billing plans in JSON format.

Billing plan attributes:

Name Description
id Billing plan identifier
type Billing plan type: monthly or annual
label Short description
totalPrice Total cost for the plan. This amount will be charged to the customer's credit card.
costPerMonth Effective monthly cost.

Requesting example:

https://papi.mylife.com/pdiscover.v1/psk/product/price/90210?access_token=49021e26-44db-43cd-a6ba-7b33e313f217

Response:


[  
   {  
      "type":"annual",
      "id":"Jlm8jSkL37FjScV3QJHjpA==",
      "label":"12-Month Membership | $12.95 | was $26 | Best Value!",
      "totalPrice":155.40,
      "costPerMonth":12.95
   },
   {  
      "type":"monthly",
      "id":"4V0IgbEMQIPeqbnuFTU8oQ==",
      "label":"1-Month Membership | $17.95 | was $44.85 | ",
      "totalPrice":17.95,
      "costPerMonth":17.95
   }
]

Clone this wiki locally