getCustomersCustomerCashBalanceTransactionsTransaction
Retrieve a cash balance transaction
Details
- Method:
GET - Path:
/v1/customers/{customer}/cash_balance_transactions/{transaction} - Operation ID:
GetCustomersCustomerCashBalanceTransactionsTransaction
Parameters
{
"customer": {
"description": "",
"required": true,
"location": "path",
"type": "string"
},
"expand": {
"description": "Specifies which fields in the response should be expanded.",
"required": false,
"location": "query",
"type": "array"
},
"transaction": {
"description": "",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.",
"properties": {
"adjusted_for_overdraft": {
"description": "",
"properties": {
"balance_transaction": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/balance_transaction"
}
],
"description": "The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/balance_transaction"
}
]
}
},
"linked_transaction": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer_cash_balance_transaction"
}
],
"description": "The [Cash Balance Transaction](https://docs.stripe.com/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer_cash_balance_transaction"
}
]
}
}
},
"required": [
"balance_transaction",
"linked_transaction"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft",
"type": "object",
"x-expandableFields": [
"balance_transaction",
"linked_transaction"
]
},
"applied_to_payment": {
"description": "",
"properties": {
"payment_intent": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_intent"
}
],
"description": "The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were applied to.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_intent"
}
]
}
}
},
"required": [
"payment_intent"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction",
"type": "object",
"x-expandableFields": [
"payment_intent"
]
},
"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).",
"maxLength": 5000,
"type": "string"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer"
}
],
"description": "The customer whose available cash balance changed as a result of this transaction.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
}
]
}
},
"customer_account": {
"description": "The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"ending_balance": {
"description": "The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal).",
"type": "integer"
},
"funded": {
"description": "",
"properties": {
"bank_transfer": {
"description": "",
"properties": {
"eu_bank_transfer": {
"description": "",
"properties": {
"bic": {
"description": "The BIC of the bank of the sender of the funding.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"iban_last4": {
"description": "The last 4 digits of the IBAN of the sender of the funding.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"sender_name": {
"description": "The full name of the sender, as supplied by the sending bank.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer",
"type": "object",
"x-expandableFields": []
},
"gb_bank_transfer": {
"description": "",
"properties": {
"account_number_last4": {
"description": "The last 4 digits of the account number of the sender of the funding.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"sender_name": {
"description": "The full name of the sender, as supplied by the sending bank.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"sort_code": {
"description": "The sort code of the bank of the sender of the funding",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer",
"type": "object",
"x-expandableFields": []
},
"jp_bank_transfer": {
"description": "",
"properties": {
"sender_bank": {
"description": "The name of the bank of the sender of the funding.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"sender_branch": {
"description": "The name of the bank branch of the sender of the funding.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"sender_name": {
"description": "The full name of the sender, as supplied by the sending bank.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer",
"type": "object",
"x-expandableFields": []
},
"reference": {
"description": "The user-supplied reference field on the bank transfer.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"type": {
"description": "The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.",
"enum": [
"eu_bank_transfer",
"gb_bank_transfer",
"jp_bank_transfer",
"mx_bank_transfer",
"us_bank_transfer"
],
"type": "string",
"x-stripeBypassValidation": true
},
"us_bank_transfer": {
"description": "",
"properties": {
"network": {
"description": "The banking network used for this funding.",
"enum": [
"ach",
"domestic_wire_us",
"swift"
],
"type": "string"
},
"sender_name": {
"description": "The full name of the sender, as supplied by the sending bank.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer",
"type": "object",
"x-expandableFields": []
}
},
"required": [
"type"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer",
"type": "object",
"x-expandableFields": [
"eu_bank_transfer",
"gb_bank_transfer",
"jp_bank_transfer",
"us_bank_transfer"
]
}
},
"required": [
"bank_transfer"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction",
"type": "object",
"x-expandableFields": [
"bank_transfer"
]
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"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"
},
"net_amount": {
"description": "The amount by which the cash balance changed, represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.",
"type": "integer"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"customer_cash_balance_transaction"
],
"type": "string"
},
"refunded_from_payment": {
"description": "",
"properties": {
"refund": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/refund"
}
],
"description": "The [Refund](https://docs.stripe.com/api/refunds/object) that moved these funds into the customer's cash balance.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/refund"
}
]
}
}
},
"required": [
"refund"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction",
"type": "object",
"x-expandableFields": [
"refund"
]
},
"transferred_to_balance": {
"description": "",
"properties": {
"balance_transaction": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/balance_transaction"
}
],
"description": "The [Balance Transaction](https://docs.stripe.com/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/balance_transaction"
}
]
}
}
},
"required": [
"balance_transaction"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance",
"type": "object",
"x-expandableFields": [
"balance_transaction"
]
},
"type": {
"description": "The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://docs.stripe.com/payments/customer-balance#types) to learn more about these types.",
"enum": [
"adjusted_for_overdraft",
"applied_to_payment",
"funded",
"funding_reversed",
"refunded_from_payment",
"return_canceled",
"return_initiated",
"transferred_to_balance",
"unapplied_from_payment"
],
"type": "string"
},
"unapplied_from_payment": {
"description": "",
"properties": {
"payment_intent": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_intent"
}
],
"description": "The [Payment Intent](https://docs.stripe.com/api/payment_intents/object) that funds were unapplied from.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_intent"
}
]
}
}
},
"required": [
"payment_intent"
],
"title": "CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction",
"type": "object",
"x-expandableFields": [
"payment_intent"
]
}
},
"required": [
"created",
"currency",
"customer",
"ending_balance",
"id",
"livemode",
"net_amount",
"object",
"type"
],
"title": "CustomerCashBalanceTransaction",
"type": "object",
"x-expandableFields": [
"adjusted_for_overdraft",
"applied_to_payment",
"customer",
"funded",
"refunded_from_payment",
"transferred_to_balance",
"unapplied_from_payment"
],
"x-resourceId": "customer_cash_balance_transaction"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('getCustomersCustomerCashBalanceTransactionsTransaction', {
# Add required parameters here
})