curl --request POST \
--url https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"automatic_collection": false,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
'import requests
url = "https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents"
payload = {
"automatic_collection": False,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({automatic_collection: false, terms_id: 'REPLACE_WITH_TERMS_ID'})
};
fetch('https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({automatic_collection: false, terms_id: 'REPLACE_WITH_TERMS_ID'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents"
payload := strings.NewReader("{\n \"automatic_collection\": false,\n \"terms_id\": \"REPLACE_WITH_TERMS_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}Grant or revoke automatic billing collection
Grant (automatic_collection=true) or revoke (false) the workspace payer’s consent to automatic invoice collection under the approved billing terms (terms_id). A grant must send expected_generation equal to the payer’s current consent_generation (409 billing_consent_stale otherwise); revocation needs no generation. Requires a dashboard sign-in with the Owner or Admin role and recent sign-in verification. Exact retries reuse the body and Idempotency-Key; a new authorization needs a new key.
Raw HTTP template
Replace path, credential and schema placeholders using valid resources. The planned host requires activation; use your assigned API URL meanwhile. Preserve a write’s original idempotency key when its contract supports retry. If sending raw HTTP/1.1, use CRLF for request and header lines. Set Content-Length to the byte length of the final encoded body after replacing placeholders, including multipart delimiters and line endings.
POST /v1/portal/workspaces/{tenant_id}/billing/consents?environment=REPLACE_WITH_VALID_VALUE HTTP/1.1
Host: sandbox.ignite-checkout.ai
Authorization: Bearer <CustomerOIDC-credential>
Idempotency-Key: <persisted-value-for-this-operation>
Content-Type: application/json
Content-Length: <body-length-in-bytes>
{
"automatic_collection": true,
"expected_generation": 0,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
HTTP/2 header equivalent
Logical headers over negotiated HTTPS HTTP/2, not a wire-format message. The endpoint, JSON and idempotency rules are unchanged. See HTTP and transport.
:method: POST
:scheme: https
:authority: sandbox.ignite-checkout.ai
:path: /v1/portal/workspaces/{tenant_id}/billing/consents?environment=REPLACE_WITH_VALID_VALUE
authorization: Bearer <CustomerOIDC-credential>
idempotency-key: <persisted-value-for-this-operation>
content-type: application/json
{
"automatic_collection": true,
"expected_generation": 0,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
curl --request POST \
--url https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"automatic_collection": false,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
'import requests
url = "https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents"
payload = {
"automatic_collection": False,
"terms_id": "REPLACE_WITH_TERMS_ID"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({automatic_collection: false, terms_id: 'REPLACE_WITH_TERMS_ID'})
};
fetch('https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({automatic_collection: false, terms_id: 'REPLACE_WITH_TERMS_ID'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.ignite-checkout.ai/v1/portal/workspaces/{tenant_id}/billing/consents"
payload := strings.NewReader("{\n \"automatic_collection\": false,\n \"terms_id\": \"REPLACE_WITH_TERMS_ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Customer access token; current membership, role and app selection are enforced. Protected actions use recent email-code verification in the configured Sandbox or recent authenticator verification in legacy password mode. Available when customer authentication is enabled.
Headers
Required. A client-generated key that identifies this operation so it can be retried safely. Repeating the request with the same key and the same body returns the original result instead of performing the action again; reusing a key with a different body is rejected with 409. After a timeout or network error, retry with the same key, never a new one.
1 - 80^[A-Za-z0-9_-]+$Body
Response
Successful Response