curl --request POST \
--url https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"paidDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid"
payload = { "paidDate": "2023-11-07T05:31:56Z" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({paidDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid', 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.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid",
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([
'paidDate' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid"
payload := strings.NewReader("{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"invoiceRef": "<string>",
"invoiceId": "<string>",
"reconciled": true,
"paidDate": "<string>"
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Mark invoice as paid
Marks an invoice as paid and records the payment date, defaulting to now. Addressed by invoice ID, so it reaches a contract’s invoices — unlike the subscription-scoped equivalent, which resolves a subscription first.
curl --request POST \
--url https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"paidDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid"
payload = { "paidDate": "2023-11-07T05:31:56Z" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({paidDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid', 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.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid",
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([
'paidDate' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid"
payload := strings.NewReader("{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stigg.io/api/v1/customers/{id}/invoices/{invoiceRef}/paid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paidDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"invoiceRef": "<string>",
"invoiceId": "<string>",
"reconciled": true,
"paidDate": "<string>"
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "CustomerNotFound"
}{
"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
External ID of the customer the invoice belongs to: your customer ref when mapped, otherwise the Received customer ID
1 - 255^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$The billing provider (Received) invoice ID
255Body
Input for marking an invoice as paid.
When the invoice was paid. Defaults to now
Response
The outcome of the reconciliation.
Response object
The outcome of marking an invoice as paid.
Show child attributes
Show child attributes
Related topics
Mark subscription invoice as paidGo SDKRate LimitsBill customers using invoicesZuora callouts and incoming events