Skip to main content
POST
/
v0
/
subscriptions
/
{id}
/
reconciliations
Reconcile Features
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>"
      }
    ]
  },
  "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"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The subscription ID

Body

application/json
dryRun
boolean
default:false

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.

object
enum<string>
required
Available options:
subscriptionReconciliation
dryRun
boolean
required

True when this reconciliation was a preview — no entitlement, grant, or line item was created.

features
object
required
lineItems
object
required