Integrations

CheckoutChamp

Connect a CheckoutChamp API user so the AI agent can manage orders, customers and subscriptions.

Connecting CheckoutChamp lets the AI agent work with your orders, customers and subscriptions. It can look up an order, skip a shipment, cancel a subscription or issue a refund, as far as your API user's permissions allow.

Octocom stores the API user's credentials securely and hands them to your custom actions and other Python automations when they run. Connecting alone doesn't sync data or change anything in CheckoutChamp.

Create an API user in CheckoutChamp

  1. In CheckoutChamp, open Admin -> Users and select Add User.
  2. Enter a Username, for example octocom. This is the login ID Octocom sends with each API call.
  3. Set Access Level to Api User. API users can only make API calls; they cannot sign in to the CRM.
  4. Enter a Password and confirm it. CheckoutChamp does not allow an & in API passwords.
  5. Choose the user's API permissions. Query Orders is the minimum: Octocom's connection check runs an order search. Add the others for what you want Octocom to do; see Choosing permissions.
  6. Add Octocom's IP address 74.242.171.127 to the user's IP whitelist and save. CheckoutChamp rejects API calls from any other address.

Every Octocom customer shares that IP address, so the whitelist alone doesn't protect the account: use a dedicated API user with a strong, unique password and only the permissions your automations need.

Choosing permissions

Start from what you want the bot to do, and allow only those permissions. These are common choices, named as they appear when you edit the API user in CheckoutChamp:

What the bot should doPermissions
Required for any setupQuery Orders
Look up customers, subscriptions and paymentsQuery Customers, Query Purchase, Query Transactions
Skip shipments, change billing dates or frequency, apply discountsUpdate Purchase
Cancel subscriptionsCancel Purchase
Cancel orders before they shipCancel Order
Hold orders or update shipping detailsUpdate Order, Update Fulfillment
Issue full or partial refundsRefund Order, Refund Transaction
Leave a note of what was doneAdd Customer Note

A support bot that only answers "where is my order" questions needs only Query Orders. One that handles subscription changes, cancellations and refunds needs the matching write permissions too. You can change them later by editing the same API user; there is no need to reconnect in Octocom or change the password.

See CheckoutChamp's guide to creating an API user.

Connect it in Octocom

  1. Open Settings -> Workspace -> Integrations -> CheckoutChamp.
  2. Enter the API user's username and password, then select Connect.
  3. Octocom saves the credentials and checks them right away with one read-only order search. If the check fails, the message says what to fix: usually the IP whitelist, the access level or a missing Query Orders permission. Fix it in CheckoutChamp and select Test connection. You don't need to re-enter the password.

To change the username later, edit it and select Save changes. Leave the password empty to keep the saved one. The password is never shown again after saving.

You can also ask Copilot to connect CheckoutChamp, check the connection or disconnect it.

Use it from Python

The checkoutChamp entry in get_integration_credentials contains loginId, password and apiBaseUrl (https://api.checkoutchamp.com). CheckoutChamp takes the credentials as loginId and password parameters on every call. Send requests with proxy_request or proxy_session so they come from the whitelisted IP; plain requests calls are rejected.

def execute_action(context):
    credentials = get_integration_credentials(context)
    checkout_champ = credentials.get("your-business-slug", {}).get("checkoutChamp")
    if not checkout_champ:
        raise ValueError("Connect CheckoutChamp in Settings -> Integrations first.")

    response = proxy_request(
        "POST",
        f"{checkout_champ['apiBaseUrl']}/order/query/",
        params={
            "loginId": checkout_champ["loginId"],
            "password": checkout_champ["password"],
            "orderId": context["args"]["orderId"],
        },
    )
    # Don't call raise_for_status(): its error message contains the URL, password included.
    if not response.ok:
        return {"error": f"CheckoutChamp returned HTTP {response.status_code}."}
    result = response.json()
    if result.get("result") != "SUCCESS":
        return {"error": result.get("message")}
    return result["message"]

CheckoutChamp answers with HTTP 200 and "result": "ERROR" when it rejects a call, so check result rather than only the status code. The password is part of the request URL: never log the URL, the parameters or the credentials, and don't use raise_for_status(), whose error message includes the full URL. See the CheckoutChamp API reference for the available operations and their parameters.

Disconnect

Open Settings -> Workspace -> Integrations -> CheckoutChamp and select Disconnect. Automations that use the connection stop working. The API user stays in CheckoutChamp; delete it there if you no longer need it.

On this page