Replicate iTunes subscription within eSuite
1 min
POST
https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/native-billing/itunes
Path Parameters
- accountReferencestringrequiredDescription
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- subscribeITunesAppRequestFictiveGlobal.Api.Rest.Dtos.v1.SubscribeITunesDetailsForSessionrequiredDescription
- receiptstringDescription
- itunesproductidstringDescription
- currencystringDescription
- pricenumber<double>Description
Responses
401
412
curl
curl --request POST \
--url https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/native-billing/itunes \
--header 'accept: application/json' \
--header 'x-version: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/native-billing/itunes", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/native-billing/itunes")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/native-billing/itunes"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
401
// • Not Authorized
412
// Precondition Failed
• Currency is not set up for this service.
• The service is not configured correctly. The service must be active.
• The service is not configured correctly. ITunes must be enabled for the service.
• The receipt contains multiple valid purchases.
• Preferred currency is not set up for this service.
• The service is not configured correctly.
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.