Open Context Protocol is live! 🚀 Read the launch post
postCustomersCustomerCashBalance

postCustomersCustomerCashBalance

Update a cash balance’s settings

Details

  • Method: POST
  • Path: /v1/customers/{customer}/cash_balance
  • Operation ID: PostCustomersCustomerCashBalance

Parameters

{
  "customer": {
    "description": "",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "description": "A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.",
  "properties": {
    "available": {
      "additionalProperties": {
        "type": "integer"
      },
      "description": "A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).",
      "nullable": true,
      "type": "object"
    },
    "customer": {
      "description": "The ID of the customer whose cash balance this object represents.",
      "maxLength": 5000,
      "type": "string"
    },
    "customer_account": {
      "description": "The ID of an Account representing a customer whose cash balance this object represents.",
      "maxLength": 5000,
      "nullable": true,
      "type": "string"
    },
    "livemode": {
      "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
      "type": "boolean"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value.",
      "enum": [
        "cash_balance"
      ],
      "type": "string"
    },
    "settings": {
      "description": "",
      "properties": {
        "reconciliation_mode": {
          "description": "The configuration for how funds that land in the customer cash balance are reconciled.",
          "enum": [
            "automatic",
            "manual"
          ],
          "type": "string"
        },
        "using_merchant_default": {
          "description": "A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance",
          "type": "boolean"
        }
      },
      "required": [
        "reconciliation_mode",
        "using_merchant_default"
      ],
      "title": "CustomerBalanceCustomerBalanceSettings",
      "type": "object",
      "x-expandableFields": []
    }
  },
  "required": [
    "customer",
    "livemode",
    "object",
    "settings"
  ],
  "title": "cash_balance",
  "type": "object",
  "x-expandableFields": [
    "settings"
  ],
  "x-resourceId": "cash_balance"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('stripe')

# Call this tool
result = await agent.call_tool('postCustomersCustomerCashBalance', {
    # Add required parameters here
})