Skip to main content

Configuration

Set up authentication by configuring your API credentials. Use your ChargeOver API URL, along with your username (API key) and password (API secret). Here's a sample setup:

from chargeover import ChargeOver

api_url = "https://your-chargeover-url.com"
api_key = "your_api_key"
api_secret = "your_api_secret"

chargeover = ChargeOver(api_url, api_key, api_secret)

Replace your_api_key and your_api_secret with your actual ChargeOver API credentials, and ensure the api_url is your ChargeOver instance.

Change/Update Configuration

import sys
import chargeover
import pprint

# For authentication, fill in these values from your ChargeOver
# server information under "Configuraion->API and Webhooks"
endpoint =
username =
password =

# Set this to True to use "COv1 Signature" authorization
key_auth = False

co = chargeover.ChargeOver(
endpoint,
username,
password,
key_auth = key_auth)

# Our customer data
data = {
'chargeoverjs_token': 'abcd5678'
}

# Update Config
result = co.create('_config', data)
if result is None:
pprint.pprint(co.get_last_response())
exit()
else:
print("Updated config!")