getBalance
Retrieve balance
Details
- Method:
GET - Path:
/v1/balance - Operation ID:
GetBalance
Parameters
{
"expand": {
"description": "Specifies which fields in the response should be expanded.",
"required": false,
"location": "query",
"type": "array"
}
}Response Schema
{
"description": "This is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.\n\nThe top-level `available` and `pending` comprise your \"payments balance.\"\n\nRelated guide: [Balances and settlement time](https://docs.stripe.com/payments/balances), [Understanding Connect account balances](https://docs.stripe.com/connect/account-balances)",
"properties": {
"available": {
"description": "Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://api.stripe.com#transfers) or [Payouts API](https://api.stripe.com#payouts). You can find the available balance for each currency and payment type in the `source_types` property.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
},
"connect_reserved": {
"description": "Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
},
"instant_available": {
"description": "Funds that you can pay out using Instant Payouts.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"net_available": {
"description": "Breakdown of balance by destination.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Net balance amount, subtracting fees from platform-set pricing.",
"type": "integer"
},
"destination": {
"description": "ID of the external account for this net balance (not expandable).",
"maxLength": 5000,
"type": "string"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"destination"
],
"title": "BalanceNetAvailable",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmountNet",
"type": "object",
"x-expandableFields": [
"net_available",
"source_types"
]
},
"type": "array"
},
"issuing": {
"description": "",
"properties": {
"available": {
"description": "Funds that are available for use.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
}
},
"required": [
"available"
],
"title": "BalanceDetail",
"type": "object",
"x-expandableFields": [
"available"
]
},
"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": [
"balance"
],
"type": "string"
},
"pending": {
"description": "Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
},
"refund_and_dispute_prefunding": {
"description": "",
"properties": {
"available": {
"description": "Funds that are available for use.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
},
"pending": {
"description": "Funds that are pending",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Balance amount.",
"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"
},
"source_types": {
"description": "",
"properties": {
"bank_account": {
"description": "Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).",
"type": "integer"
},
"card": {
"description": "Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).",
"type": "integer"
},
"fpx": {
"description": "Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.",
"type": "integer"
}
},
"title": "BalanceAmountBySourceType",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"amount",
"currency"
],
"title": "BalanceAmount",
"type": "object",
"x-expandableFields": [
"source_types"
]
},
"type": "array"
}
},
"required": [
"available",
"pending"
],
"title": "BalanceDetailUngated",
"type": "object",
"x-expandableFields": [
"available",
"pending"
]
}
},
"required": [
"available",
"livemode",
"object",
"pending"
],
"title": "Balance",
"type": "object",
"x-expandableFields": [
"available",
"connect_reserved",
"instant_available",
"issuing",
"pending",
"refund_and_dispute_prefunding"
],
"x-resourceId": "balance"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('getBalance', {
# Add required parameters here
})