import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.customers.listContracts('id');
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.customers.list_contracts(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Customers.ListContracts(
context.TODO(),
"id",
stigg.V1CustomerListContractsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.CustomerListContractsParams;
import io.stigg.models.v1.customers.CustomerListContractsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerListContractsResponse response = client.v1().customers().listContracts("id");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.customers.list_contracts("id")
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers;
StiggClient client = new();
CustomerListContractsParams parameters = new() { ID = "id" };
var response = await client.V1.Customers.ListContracts(parameters);
Console.WriteLine(response);stigg v1:customers list-contracts \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.stigg.io/api/v1/customers/{id}/contracts \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/{id}/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Get a list of contracts
Retrieves a customer’s contracts, fetched live from the connected billing provider, each enriched with a preview of its upcoming (next) invoice when available. Returns an empty list when no billing provider is connected or the customer is not synced.
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.customers.listContracts('id');
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.customers.list_contracts(
id="id",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.Customers.ListContracts(
context.TODO(),
"id",
stigg.V1CustomerListContractsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.CustomerListContractsParams;
import io.stigg.models.v1.customers.CustomerListContractsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
CustomerListContractsResponse response = client.v1().customers().listContracts("id");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.customers.list_contracts("id")
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers;
StiggClient client = new();
CustomerListContractsParams parameters = new() { ID = "id" };
var response = await client.V1.Customers.ListContracts(parameters);
Console.WriteLine(response);stigg v1:customers list-contracts \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.stigg.io/api/v1/customers/{id}/contracts \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/{id}/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The external identifier of the customer the contract belongs to
1 - 255^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$Response
The customer's contracts, each with its next-invoice preview when available.
A list of a customer's contracts
Show child attributes
Show child attributes
