Creating a New Customer
from chargeover import ChargeOver
# Initialize ChargeOver with API credentials
chargeover = ChargeOver("https://your-chargeover-url.com", "your_api_key", "your_api_secret")
# Define customer data
customer_data = {
"company": "Sample Company",
"email": "email@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "123-456-7890"
}
# Create the customer
response = chargeover.create('customer', customer_data)
# Check if successful
if response['status'] == 'success':
print("Customer created successfully:", response['response'])
else:
print("Error:", response['error'])