Create a charge card
curl --request POST \
--url https://clarus-api.com/api/charge_cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_cards",
"attributes": {
"code": "STANDARD",
"name": "Standard Card"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_cards"
payload = { "data": {
"type": "charge_cards",
"attributes": {
"code": "STANDARD",
"name": "Standard Card"
}
} }
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_cards', attributes: {code: 'STANDARD', name: 'Standard Card'}}
})
};
fetch('https://clarus-api.com/api/charge_cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "charge_cards",
"attributes": {
"active": true,
"code": "STANDARD",
"description": "Standard billing profile",
"id": 1,
"name": "Standard Card"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Charging: Configuration
Create a charge card
Create a new charge card billing profile.
POST
/
api
/
charge_cards
Create a charge card
curl --request POST \
--url https://clarus-api.com/api/charge_cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_cards",
"attributes": {
"code": "STANDARD",
"name": "Standard Card"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_cards"
payload = { "data": {
"type": "charge_cards",
"attributes": {
"code": "STANDARD",
"name": "Standard Card"
}
} }
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_cards', attributes: {code: 'STANDARD', name: 'Standard Card'}}
})
};
fetch('https://clarus-api.com/api/charge_cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "charge_cards",
"attributes": {
"active": true,
"code": "STANDARD",
"description": "Standard billing profile",
"id": 1,
"name": "Standard Card"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "charge_cards",
"attributes": {
"code": "STANDARD",
"name": "Standard Card",
"description": "Standard billing profile"
}
}
}
Required Fields
| Field | Description |
|---|---|
code | Unique code for the charge card (1-30 chars) |
name | Display name for the charge card (max 50 chars) |
Optional Fields
| Field | Description |
|---|---|
active | Whether the charge card is active (defaults to true) |
description | Description of the billing profile |
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 Card created successfully
Show child attributes
Show child attributes
⌘I

