postCustomersCustomerFundingInstructions
Create or retrieve funding instructions for a customer cash balance
Details
- Method:
POST - Path:
/v1/customers/{customer}/funding_instructions - Operation ID:
PostCustomersCustomerFundingInstructions
Parameters
{
"customer": {
"description": "",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"description": "Each customer has a [`balance`](https://docs.stripe.com/api/customers/object#customer_object-balance) that is\nautomatically applied to future invoices and payments using the `customer_balance` payment method.\nCustomers can fund this balance by initiating a bank transfer to any account in the\n`financial_addresses` field.\nRelated guide: [Customer balance funding instructions](https://docs.stripe.com/payments/customer-balance/funding-instructions)",
"properties": {
"bank_transfer": {
"description": "",
"properties": {
"country": {
"description": "The country of the bank account to fund",
"maxLength": 5000,
"type": "string"
},
"financial_addresses": {
"description": "A list of financial addresses that can be used to fund a particular balance",
"items": {
"description": "FinancialAddresses contain identifying information that resolves to a FinancialAccount.",
"properties": {
"aba": {
"description": "ABA Records contain U.S. bank account details per the ABA format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The account holder name",
"maxLength": 5000,
"type": "string"
},
"account_number": {
"description": "The ABA account number",
"maxLength": 5000,
"type": "string"
},
"account_type": {
"description": "The account type",
"maxLength": 5000,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"bank_name": {
"description": "The bank name",
"maxLength": 5000,
"type": "string"
},
"routing_number": {
"description": "The ABA routing number",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"account_holder_address",
"account_holder_name",
"account_number",
"account_type",
"bank_address",
"bank_name",
"routing_number"
],
"title": "FundingInstructionsBankTransferABARecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
},
"iban": {
"description": "Iban Records contain E.U. bank account details per the SEPA format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The name of the person or business that owns the bank account",
"maxLength": 5000,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"bic": {
"description": "The BIC/SWIFT code of the account.",
"maxLength": 5000,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"type": "string"
},
"iban": {
"description": "The IBAN of the account.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"account_holder_address",
"account_holder_name",
"bank_address",
"bic",
"country",
"iban"
],
"title": "FundingInstructionsBankTransferIbanRecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
},
"sort_code": {
"description": "Sort Code Records contain U.K. bank account details per the sort code format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The name of the person or business that owns the bank account",
"maxLength": 5000,
"type": "string"
},
"account_number": {
"description": "The account number",
"maxLength": 5000,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"sort_code": {
"description": "The six-digit sort code",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"account_holder_address",
"account_holder_name",
"account_number",
"bank_address",
"sort_code"
],
"title": "FundingInstructionsBankTransferSortCodeRecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
},
"spei": {
"description": "SPEI Records contain Mexico bank account details per the SPEI format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The account holder name",
"maxLength": 5000,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"bank_code": {
"description": "The three-digit bank code",
"maxLength": 5000,
"type": "string"
},
"bank_name": {
"description": "The short banking institution name",
"maxLength": 5000,
"type": "string"
},
"clabe": {
"description": "The CLABE number",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"account_holder_address",
"account_holder_name",
"bank_address",
"bank_code",
"bank_name",
"clabe"
],
"title": "FundingInstructionsBankTransferSpeiRecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
},
"supported_networks": {
"description": "The payment networks supported by this FinancialAddress",
"items": {
"enum": [
"ach",
"bacs",
"domestic_wire_us",
"fps",
"sepa",
"spei",
"swift",
"zengin"
],
"type": "string",
"x-stripeBypassValidation": true
},
"type": "array"
},
"swift": {
"description": "SWIFT Records contain U.S. bank account details per the SWIFT format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The account holder name",
"maxLength": 5000,
"type": "string"
},
"account_number": {
"description": "The account number",
"maxLength": 5000,
"type": "string"
},
"account_type": {
"description": "The account type",
"maxLength": 5000,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"bank_name": {
"description": "The bank name",
"maxLength": 5000,
"type": "string"
},
"swift_code": {
"description": "The SWIFT code",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"account_holder_address",
"account_holder_name",
"account_number",
"account_type",
"bank_address",
"bank_name",
"swift_code"
],
"title": "FundingInstructionsBankTransferSwiftRecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
},
"type": {
"description": "The type of financial address",
"enum": [
"aba",
"iban",
"sort_code",
"spei",
"swift",
"zengin"
],
"type": "string",
"x-stripeBypassValidation": true
},
"zengin": {
"description": "Zengin Records contain Japan bank account details per the Zengin format.",
"properties": {
"account_holder_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"account_holder_name": {
"description": "The account holder name",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"account_number": {
"description": "The account number",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"account_type": {
"description": "The bank account type. In Japan, this can only be `futsu` or `toza`.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"bank_address": {
"description": "",
"properties": {
"city": {
"description": "City, district, suburb, town, or village.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line1": {
"description": "Address line 1, such as the street, PO Box, or company name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"line2": {
"description": "Address line 2, such as the apartment, suite, unit, or building.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"postal_code": {
"description": "ZIP or postal code.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"state": {
"description": "State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "Address",
"type": "object",
"x-expandableFields": []
},
"bank_code": {
"description": "The bank code of the account",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"bank_name": {
"description": "The bank name of the account",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"branch_code": {
"description": "The branch code of the account",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"branch_name": {
"description": "The branch name of the account",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"required": [
"account_holder_address",
"bank_address"
],
"title": "FundingInstructionsBankTransferZenginRecord",
"type": "object",
"x-expandableFields": [
"account_holder_address",
"bank_address"
]
}
},
"required": [
"type"
],
"title": "FundingInstructionsBankTransferFinancialAddress",
"type": "object",
"x-expandableFields": [
"aba",
"iban",
"sort_code",
"spei",
"swift",
"zengin"
]
},
"type": "array"
},
"type": {
"description": "The bank_transfer type",
"enum": [
"eu_bank_transfer",
"jp_bank_transfer"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"country",
"financial_addresses",
"type"
],
"title": "FundingInstructionsBankTransfer",
"type": "object",
"x-expandableFields": [
"financial_addresses"
]
},
"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"
},
"funding_type": {
"description": "The `funding_type` of the returned instructions",
"enum": [
"bank_transfer"
],
"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": [
"funding_instructions"
],
"type": "string"
}
},
"required": [
"bank_transfer",
"currency",
"funding_type",
"livemode",
"object"
],
"title": "CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions",
"type": "object",
"x-expandableFields": [
"bank_transfer"
],
"x-resourceId": "funding_instructions"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('postCustomersCustomerFundingInstructions', {
# Add required parameters here
})