Import
Preview a RevenueCat Import
Dry-run a RevenueCat export — see what a commit would do, with no side effects.
POST
/
v1
/
import
/
revenuecat
/
preview
Dry-run preview of a RevenueCat export
curl --request POST \
--url https://billing.example.com/v1/import/revenuecat/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscribers": [
{}
],
"products": [
{}
]
}
'import requests
url = "https://billing.example.com/v1/import/revenuecat/preview"
payload = {
"subscribers": [{}],
"products": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscribers: [{}], products: [{}]})
};
fetch('https://billing.example.com/v1/import/revenuecat/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/import/revenuecat/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscribers' => [
[
]
],
'products' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/import/revenuecat/preview"
payload := strings.NewReader("{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.example.com/v1/import/revenuecat/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/import/revenuecat/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"summary": {},
"warnings": [
"<string>"
]
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}Parses an uploaded RevenueCat export (subscribers with their subscriptions,
and products) and returns the plan a
commit would execute — nothing is
written. RevenueCat identifies subscribers by
The response is the dry-run plan:
app_user_id; subscribers
without an email surface as conflicts, because Recurso requires one.
Example request
curl -X POST https://api.recurso.dev/v1/import/revenuecat/preview \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subscribers": [
{
"app_user_id": "usr_8f2c1e846a3d4b7e",
"email": "maya@example.com",
"subscriptions": [
{ "id": "rcsub_2b4e8a1d7c53", "product_id": "premium_monthly", "store": "app_store", "expires_at": "2026-09-01T00:00:00Z", "is_active": true, "is_trial": false }
]
}
],
"products": [
{ "id": "premium_monthly", "title": "Premium Monthly", "price": 999, "currency": "USD", "period_unit": "month", "period_count": 1 }
]
}'
items (each with a kind, source id,
label, and planned action), a summary of per-action counts, and
warnings. Product price is minor units.Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
⌘I
Dry-run preview of a RevenueCat export
curl --request POST \
--url https://billing.example.com/v1/import/revenuecat/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscribers": [
{}
],
"products": [
{}
]
}
'import requests
url = "https://billing.example.com/v1/import/revenuecat/preview"
payload = {
"subscribers": [{}],
"products": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscribers: [{}], products: [{}]})
};
fetch('https://billing.example.com/v1/import/revenuecat/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/import/revenuecat/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscribers' => [
[
]
],
'products' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/import/revenuecat/preview"
payload := strings.NewReader("{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.example.com/v1/import/revenuecat/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/import/revenuecat/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscribers\": [\n {}\n ],\n \"products\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"summary": {},
"warnings": [
"<string>"
]
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}