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

getBalanceTransactionsId

Retrieve a balance transaction

Details

  • Method: GET
  • Path: /v1/balance_transactions/{id}
  • Operation ID: GetBalanceTransactionsId

Parameters

{
  "expand": {
    "description": "Specifies which fields in the response should be expanded.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "id": {
    "description": "",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "description": "Balance transactions represent funds moving through your Stripe account.\nStripe creates them for every type of transaction that enters or leaves your Stripe account balance.\n\nRelated guide: [Balance transaction types](https://docs.stripe.com/reports/balance-transaction-types)",
  "properties": {
    "amount": {
      "description": "Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.",
      "type": "integer"
    },
    "available_on": {
      "description": "The date that the transaction's net funds become available in the Stripe balance.",
      "format": "unix-time",
      "type": "integer"
    },
    "balance_type": {
      "description": "The balance that this transaction impacts.",
      "enum": [
        "issuing",
        "payments",
        "refund_and_dispute_prefunding"
      ],
      "type": "string",
      "x-stripeBypassValidation": true
    },
    "created": {
      "description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
      "format": "unix-time",
      "type": "integer"
    },
    "currency": {
      "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
      "format": "currency",
      "type": "string"
    },
    "description": {
      "description": "An arbitrary string attached to the object. Often useful for displaying to users.",
      "maxLength": 5000,
      "nullable": true,
      "type": "string"
    },
    "exchange_rate": {
      "description": "If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.",
      "nullable": true,
      "type": "number"
    },
    "fee": {
      "description": "Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.",
      "type": "integer"
    },
    "fee_details": {
      "description": "Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.",
      "items": {
        "description": "",
        "properties": {
          "amount": {
            "description": "Amount of the fee, in cents.",
            "type": "integer"
          },
          "application": {
            "description": "ID of the Connect application that earned the fee.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
            "format": "currency",
            "type": "string"
          },
          "description": {
            "description": "An arbitrary string attached to the object. Often useful for displaying to users.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          },
          "type": {
            "description": "Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.",
            "maxLength": 5000,
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "type"
        ],
        "title": "Fee",
        "type": "object",
        "x-expandableFields": []
      },
      "type": "array"
    },
    "id": {
      "description": "Unique identifier for the object.",
      "maxLength": 5000,
      "type": "string"
    },
    "net": {
      "description": "Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`",
      "type": "integer"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value.",
      "enum": [
        "balance_transaction"
      ],
      "type": "string"
    },
    "reporting_category": {
      "description": "Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.",
      "maxLength": 5000,
      "type": "string"
    },
    "source": {
      "anyOf": [
        {
          "maxLength": 5000,
          "type": "string"
        },
        {
          "$ref": "#/components/schemas/application_fee"
        },
        {
          "$ref": "#/components/schemas/charge"
        },
        {
          "$ref": "#/components/schemas/connect_collection_transfer"
        },
        {
          "$ref": "#/components/schemas/customer_cash_balance_transaction"
        },
        {
          "$ref": "#/components/schemas/dispute"
        },
        {
          "$ref": "#/components/schemas/fee_refund"
        },
        {
          "$ref": "#/components/schemas/issuing.authorization"
        },
        {
          "$ref": "#/components/schemas/issuing.dispute"
        },
        {
          "$ref": "#/components/schemas/issuing.transaction"
        },
        {
          "$ref": "#/components/schemas/payout"
        },
        {
          "$ref": "#/components/schemas/refund"
        },
        {
          "$ref": "#/components/schemas/reserve_transaction"
        },
        {
          "$ref": "#/components/schemas/tax_deducted_at_source"
        },
        {
          "$ref": "#/components/schemas/topup"
        },
        {
          "$ref": "#/components/schemas/transfer"
        },
        {
          "$ref": "#/components/schemas/transfer_reversal"
        }
      ],
      "description": "This transaction relates to the Stripe object.",
      "nullable": true,
      "x-expansionResources": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/application_fee"
          },
          {
            "$ref": "#/components/schemas/charge"
          },
          {
            "$ref": "#/components/schemas/connect_collection_transfer"
          },
          {
            "$ref": "#/components/schemas/customer_cash_balance_transaction"
          },
          {
            "$ref": "#/components/schemas/dispute"
          },
          {
            "$ref": "#/components/schemas/fee_refund"
          },
          {
            "$ref": "#/components/schemas/issuing.authorization"
          },
          {
            "$ref": "#/components/schemas/issuing.dispute"
          },
          {
            "$ref": "#/components/schemas/issuing.transaction"
          },
          {
            "$ref": "#/components/schemas/payout"
          },
          {
            "$ref": "#/components/schemas/refund"
          },
          {
            "$ref": "#/components/schemas/reserve_transaction"
          },
          {
            "$ref": "#/components/schemas/tax_deducted_at_source"
          },
          {
            "$ref": "#/components/schemas/topup"
          },
          {
            "$ref": "#/components/schemas/transfer"
          },
          {
            "$ref": "#/components/schemas/transfer_reversal"
          }
        ]
      },
      "x-stripeBypassValidation": true
    },
    "status": {
      "description": "The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.",
      "maxLength": 5000,
      "type": "string"
    },
    "type": {
      "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.",
      "enum": [
        "adjustment",
        "advance",
        "advance_funding",
        "anticipation_repayment",
        "application_fee",
        "application_fee_refund",
        "charge",
        "climate_order_purchase",
        "climate_order_refund",
        "connect_collection_transfer",
        "contribution",
        "issuing_authorization_hold",
        "issuing_authorization_release",
        "issuing_dispute",
        "issuing_transaction",
        "obligation_outbound",
        "obligation_reversal_inbound",
        "payment",
        "payment_failure_refund",
        "payment_network_reserve_hold",
        "payment_network_reserve_release",
        "payment_refund",
        "payment_reversal",
        "payment_unreconciled",
        "payout",
        "payout_cancel",
        "payout_failure",
        "payout_minimum_balance_hold",
        "payout_minimum_balance_release",
        "refund",
        "refund_failure",
        "reserve_transaction",
        "reserved_funds",
        "stripe_balance_payment_debit",
        "stripe_balance_payment_debit_reversal",
        "stripe_fee",
        "stripe_fx_fee",
        "tax_fee",
        "topup",
        "topup_reversal",
        "transfer",
        "transfer_cancel",
        "transfer_failure",
        "transfer_refund"
      ],
      "type": "string"
    }
  },
  "required": [
    "amount",
    "available_on",
    "created",
    "currency",
    "fee",
    "fee_details",
    "id",
    "net",
    "object",
    "reporting_category",
    "status",
    "type"
  ],
  "title": "BalanceTransaction",
  "type": "object",
  "x-expandableFields": [
    "fee_details",
    "source"
  ],
  "x-resourceId": "balance_transaction"
}

Usage

from ocp_agent import OCPAgent

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

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