curl --request GET \
--url https://api.paygentic.io/v0/contracts/{id}/projected \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/contracts/{id}/projected"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/contracts/{id}/projected', 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/contracts/{id}/projected",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paygentic.io/v0/contracts/{id}/projected"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v0/contracts/{id}/projected")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/contracts/{id}/projected")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"invoiceAt": "2023-11-07T05:31:56Z",
"chargeDate": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"paymentTermDays": 123,
"currency": "<string>",
"autoCharge": true,
"bankTransferOnly": true,
"autoApproveInvoices": true,
"lineItems": [
{
"contractLineId": "<string>",
"contractVersion": 123,
"itemId": "<string>",
"type": "fee",
"displayName": "<string>",
"description": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"paymentTerm": "in_advance",
"quantity": "<string>",
"unitPrice": "<string>",
"subtotal": "<string>",
"upliftFactor": "<string>"
}
]
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"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"
}Projected invoices
Returns the invoices the contract would produce, grouped as the invoice collector groups them, and writes nothing. It reads the pending change when one waits for approval and the contract in force otherwise. From a line’s next billing moment a pending change shows its new amounts; before it, the amounts of the contract in force. An invoice is one customer, currency, autoCharge, bankTransferOnly, autoApprove.invoices, invoice date and charge date, so a renewal invoiced early is apart from usage charged on the same day. The dates read on the customer’s clock: an invoice date that has passed is shown as now. A metered line shows its rate in unitPrice and has no quantity or subtotal until the usage is measured. paymentTermDays is the larger of the customer’s term (else the merchant’s) and the days from the invoice date to the charge date. A rejected contract has no invoices. A draft with content no invoice can be generated from answers 400 CONTRACT_LINE_NOT_PROJECTABLE.
curl --request GET \
--url https://api.paygentic.io/v0/contracts/{id}/projected \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/contracts/{id}/projected"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/contracts/{id}/projected', 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/contracts/{id}/projected",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paygentic.io/v0/contracts/{id}/projected"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paygentic.io/v0/contracts/{id}/projected")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/contracts/{id}/projected")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"invoiceAt": "2023-11-07T05:31:56Z",
"chargeDate": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"paymentTermDays": 123,
"currency": "<string>",
"autoCharge": true,
"bankTransferOnly": true,
"autoApproveInvoices": true,
"lineItems": [
{
"contractLineId": "<string>",
"contractVersion": 123,
"itemId": "<string>",
"type": "fee",
"displayName": "<string>",
"description": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"paymentTerm": "in_advance",
"quantity": "<string>",
"unitPrice": "<string>",
"subtotal": "<string>",
"upliftFactor": "<string>"
}
]
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"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"
}Query Parameters
Was this page helpful?