curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/stripe/summary?token='import requests
url = "https://sandbox.circularo.com/api/v1/stripe/summary?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/stripe/summary?token=', 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://sandbox.circularo.com/api/v1/stripe/summary?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/stripe/summary?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/stripe/summary?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/stripe/summary?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"activePriceIds": [
"price_1Nq8yZ2eZvKYlo2C0X9Yz3Ab"
],
"activeProductIds": [
"prod_QsW1eZvKYlo2C0"
],
"cancelAt": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"customerBalance": 5000,
"lastChangedAmount": 2500,
"lastInvoiceHostedUrl": "<string>",
"lastInvoiceId": "in_1Nq8yZ2eZvKYlo2C0X9Yz3Ab",
"lastInvoiceStatus": "paid",
"lastPaymentAmount": 12000,
"lastPaymentCurrency": "eur",
"lastPaymentDate": "2023-11-07T05:31:56Z",
"nextChangedAmount": 2500,
"nextPaymentAmount": 12000,
"nextPaymentCurrency": "eur",
"nextPaymentDate": "2023-11-07T05:31:56Z",
"pendingUpdateExists": true,
"pendingUpdateExpiresAt": "2023-11-07T05:31:56Z",
"remainingCredit": 5000,
"status": "active",
"subscriptionId": "sub_1Nq8yZ2eZvKYlo2C0X9Yz3Ab",
"subscriptionItemsCount": 2,
"upcomingAmountDue": 9520,
"upcomingProrationCredit": 3000,
"upcomingProrationDebit": 4500,
"upcomingSubtotal": 12000,
"upcomingTax": 2520,
"upcomingTotal": 14520
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Get the billing summary of the subscription
GET /stripe/summary
Returns what the payment provider currently knows about the organization’s subscription, gathered into one answer for a billing screen: where the subscription stands and how far its period has run, the last payment with its invoice, what the next invoice is shaping up to be - its tax, the credit waiting to be used up and the extra charge or credit a change made in the middle of a period has produced - and which prices and products the subscription is made of.
Every amount is in the smallest unit of its currency, so ten euros reads as 1000. The figures for the invoice still to come are the provider’s own preview and are left empty while it cannot be worked out.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user role: organization_admin
curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/stripe/summary?token='import requests
url = "https://sandbox.circularo.com/api/v1/stripe/summary?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/stripe/summary?token=', 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://sandbox.circularo.com/api/v1/stripe/summary?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/stripe/summary?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/stripe/summary?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/stripe/summary?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"activePriceIds": [
"price_1Nq8yZ2eZvKYlo2C0X9Yz3Ab"
],
"activeProductIds": [
"prod_QsW1eZvKYlo2C0"
],
"cancelAt": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"customerBalance": 5000,
"lastChangedAmount": 2500,
"lastInvoiceHostedUrl": "<string>",
"lastInvoiceId": "in_1Nq8yZ2eZvKYlo2C0X9Yz3Ab",
"lastInvoiceStatus": "paid",
"lastPaymentAmount": 12000,
"lastPaymentCurrency": "eur",
"lastPaymentDate": "2023-11-07T05:31:56Z",
"nextChangedAmount": 2500,
"nextPaymentAmount": 12000,
"nextPaymentCurrency": "eur",
"nextPaymentDate": "2023-11-07T05:31:56Z",
"pendingUpdateExists": true,
"pendingUpdateExpiresAt": "2023-11-07T05:31:56Z",
"remainingCredit": 5000,
"status": "active",
"subscriptionId": "sub_1Nq8yZ2eZvKYlo2C0X9Yz3Ab",
"subscriptionItemsCount": 2,
"upcomingAmountDue": 9520,
"upcomingProrationCredit": 3000,
"upcomingProrationDebit": 4500,
"upcomingSubtotal": 12000,
"upcomingTax": 2520,
"upcomingTotal": 14520
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 429,
"type": "SYSTEM:RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Response
Returns the summary of the subscription.
What a change made in the middle of the current period adds up to on the invoice still to come, in the smallest unit of its currency - the extra charge less the credit, so a downgrade reads as a negative figure. Empty where the coming invoice carries nothing of the sort.
2500