curl --request POST \
--url https://api.paygentic.io/v0/subscriptions/{id}/reconciliations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dryRun": false
}
'import requests
url = "https://api.paygentic.io/v0/subscriptions/{id}/reconciliations"
payload = { "dryRun": False }
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({dryRun: false})
};
fetch('https://api.paygentic.io/v0/subscriptions/{id}/reconciliations', 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://api.paygentic.io/v0/subscriptions/{id}/reconciliations",
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([
'dryRun' => false
]),
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://api.paygentic.io/v0/subscriptions/{id}/reconciliations"
payload := strings.NewReader("{\n \"dryRun\": false\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://api.paygentic.io/v0/subscriptions/{id}/reconciliations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dryRun\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/subscriptions/{id}/reconciliations")
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 \"dryRun\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "subscriptionReconciliation",
"dryRun": true,
"features": {
"added": [
{
"featureId": "<string>",
"featureKey": "<string>",
"billed": true
}
],
"skipped": [
{
"featureId": "<string>",
"featureKey": "<string>"
}
],
"removed": [
{
"featureId": "<string>",
"featureKey": "<string>"
}
],
"failed": [
{
"featureId": "<string>",
"featureKey": "<string>",
"reason": "entitlement_failed"
}
]
},
"lineItems": {
"created": 123,
"removed": 123,
"syncFailed": true
}
}{
"object": "subscriptionReconciliation",
"dryRun": false,
"features": {
"added": [
{
"featureId": "feat_a1b2c3d4e5f6g7h8",
"featureKey": "advanced_reporting",
"billed": true
}
],
"skipped": [
{
"featureId": "feat_i9j0k1l2m3n4o5p6",
"featureKey": "basic_dashboard"
}
],
"removed": [
{
"featureId": "feat_q7r8s9t0u1v2w3x4",
"featureKey": "legacy_export"
}
],
"failed": []
},
"lineItems": {
"created": 1,
"removed": 1
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Reconcile Features
Creates a reconciliation that converges a subscription’s feature entitlements to its current plan. Provisions a missing entitlement (and, for metered features, its initial grant) for every plan feature the subscription does not already have; cancels the entitlement and voids the grants of any feature no longer on the plan; then synchronizes the corresponding prices’ billing. An already-present feature is left unchanged. Restricted to active subscriptions billed on their plan’s line-item schedule.
curl --request POST \
--url https://api.paygentic.io/v0/subscriptions/{id}/reconciliations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dryRun": false
}
'import requests
url = "https://api.paygentic.io/v0/subscriptions/{id}/reconciliations"
payload = { "dryRun": False }
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({dryRun: false})
};
fetch('https://api.paygentic.io/v0/subscriptions/{id}/reconciliations', 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://api.paygentic.io/v0/subscriptions/{id}/reconciliations",
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([
'dryRun' => false
]),
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://api.paygentic.io/v0/subscriptions/{id}/reconciliations"
payload := strings.NewReader("{\n \"dryRun\": false\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://api.paygentic.io/v0/subscriptions/{id}/reconciliations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dryRun\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/subscriptions/{id}/reconciliations")
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 \"dryRun\": false\n}"
response = http.request(request)
puts response.read_body{
"object": "subscriptionReconciliation",
"dryRun": true,
"features": {
"added": [
{
"featureId": "<string>",
"featureKey": "<string>",
"billed": true
}
],
"skipped": [
{
"featureId": "<string>",
"featureKey": "<string>"
}
],
"removed": [
{
"featureId": "<string>",
"featureKey": "<string>"
}
],
"failed": [
{
"featureId": "<string>",
"featureKey": "<string>",
"reason": "entitlement_failed"
}
]
},
"lineItems": {
"created": 123,
"removed": 123,
"syncFailed": true
}
}{
"object": "subscriptionReconciliation",
"dryRun": false,
"features": {
"added": [
{
"featureId": "feat_a1b2c3d4e5f6g7h8",
"featureKey": "advanced_reporting",
"billed": true
}
],
"skipped": [
{
"featureId": "feat_i9j0k1l2m3n4o5p6",
"featureKey": "basic_dashboard"
}
],
"removed": [
{
"featureId": "feat_q7r8s9t0u1v2w3x4",
"featureKey": "legacy_export"
}
],
"failed": []
},
"lineItems": {
"created": 1,
"removed": 1
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
The subscription ID
Body
Preview the outcome without creating any entitlement, grant, or line item.
Response
The reconciliation did not create a full set of resources: a dry-run preview (nothing is created), a run in which one or more features could not be fully provisioned (billing is withheld until they succeed), or a run whose entitlements provisioned but whose line-item synchronization failed. Safe to retry — re-invoking this operation will not duplicate any entitlements or grants already provisioned.
Was this page helpful?