Create a charge basket
curl --request POST \
--url https://clarus-api.com/api/charge_baskets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_baskets"
payload = { "data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_baskets',
attributes: {account_id: 1, charge_card_id: 1, start_at: '2026-03-01T00:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/charge_baskets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"type": "charge_baskets",
"attributes": {
"end_at": null,
"id": 1,
"invoice_status": "not_invoiced",
"start_at": "2026-03-01T00:00:00Z",
"status": "OPEN"
},
"relationships": {
"account": {
"data": {
"id": "<string>",
"type": "accounts"
}
},
"charge_card": {
"data": {
"id": "<string>",
"type": "charge_cards"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Charging: Baskets
Create a charge basket
Create a new charge basket for collecting billable charges against an account.
POST
/
api
/
charge_baskets
Create a charge basket
curl --request POST \
--url https://clarus-api.com/api/charge_baskets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_baskets"
payload = { "data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_baskets',
attributes: {account_id: 1, charge_card_id: 1, start_at: '2026-03-01T00:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/charge_baskets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"type": "charge_baskets",
"attributes": {
"end_at": null,
"id": 1,
"invoice_status": "not_invoiced",
"start_at": "2026-03-01T00:00:00Z",
"status": "OPEN"
},
"relationships": {
"account": {
"data": {
"id": "<string>",
"type": "accounts"
}
},
"charge_card": {
"data": {
"id": "<string>",
"type": "charge_cards"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
}
}
Required Fields
| Field | Description |
|---|---|
account_id | Account to associate the basket with |
charge_card_id | Charge card (billing profile) to use |
start_at | Start date/time for the billing period |
Optional Fields
| Field | Description |
|---|---|
end_at | End date/time for the billing period |
status | Basket status: OPEN or CLOSED (defaults to OPEN) |
Important Notes
- Each account typically has one open basket at a time
- The
invoice_statusfield is system-managed and cannot be set via the API
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Charge Basket created successfully
Show child attributes
Show child attributes
⌘I

