These docs are for v2.0. Click to read the latest docs for v2.1.

createMultiCurrencySubscriptionOffer

Create different offers for different countries and currencies using localizedData array.

📘

You can try that method by clicking here

Parameters

NameTypeDescription
publisherToken*stringYou can find your publisher token at api-keys page.
offerData*objectNo description
-price*floatOffer price (in publisher's currency)
-period*stringSubscription period: week / month / 3months / 6months / year
-title*stringTitle of the offer, up to 70 chars.
-url*stringUrl to content
-descriptionstringAdditional offer description, up to 110 chars
-freePeriodsintSet your free periods number
-freeDaysintSet your free days number
-accessToTagsarrayTo which tags customer has access. Multiple tags are defined as "OR" (not "AND"). Set "(all)" if you want to give access to all of your offers.
localizedData*arrayNo description
-country*string2-letter country code
-currency*stringChoose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF
-price*flaotOffer price (in publisher's currency)
-title*stringTitle of the offer, up to 70 chars.
-url*stringUrl to content
-periodstringSubscription period: week / month / 3months / 6months / year
-descriptionstringAdditional offer description, up to 110 chars
-freePeriodsintSet your free periods number
-freeDaysintSet your free days number
-accessToTagsarrayTo which tags customer has access. Multiple tags are defined as "OR" (not "AND"). Set "(all)" if you want to give access to all of your offers.

API Request/Response

Request

{
  "method":"createMultiCurrencySubscriptionOffer",
  "params":{
    "publisherToken":"klj_nerb324sPLhmzLtp4mDmdc8slwNNyALt-1Xn2Hy0Icfay",
    "offerData":{
      "price":"10",
      "period":"month",
      "title":"Tasty and healthy food",
      "url":"http:\/\/www.testoffer.com",
      "description":"Test offer description",
      "accessToTags":[
       ]
     },
    "localizedData":[
     {
       "country":"US",
       "currency":"USD",
       "price":"10",
       "title":"Test offer for US customers",
       "freeDays": "10"
     },
     {
       "country":"FR",
       "currency":"EUR",
       "price":"8",
       "title":"Test offer for French customers",
       "url":"http:\/\/testoffer.com\/fr",
       "freeDays": "12"
      }
     ]
   },
  "jsonrpc":"2.0",
  "id":1
}

Response

{
    "result":{
      "multiCurrencyOfferId":"S740060915",
      "offers":[
        {
          "id":"S740060915_US",
          "publisherEmail":"[email protected]",
          "title":"Test offer for US customers",
          "description":"Test offer description",
          "url":"http:\/\/www.testoffer.com",
          "currency":"USD",
          "country":"US",
          "active":true,
          "createdAt":1384263564,
          "updatedAt":1384263564,
          "price":10,
          "applicableTaxRate":"0.21",
          "period":"month",
          "expiresAt":null,
          "freeDays": "10"
          "accessToTags":[

          ]
        },
        {
          "id":"S740060915_FR",
          "publisherEmail":"[email protected]",
          "title":"Test offer for French customers",
          "description":"Test offer description",
          "url":"http:\/\/testoffer.com\/fr",
          "currency":"EUR",
          "country":"FR",
          "active":true,
          "createdAt":1384263564,
          "updatedAt":1384263564,
          "price":8,
          "applicableTaxRate":"0.21",
          "period":"month",
          "expiresAt":null,
          "freeDays": "8"
          "accessToTags":[

          ]
        }
      ]
    },
    "id":"1",
    "error":null,
    "jsonrpc":"2.0"
  }