Fund a test mode cash balance Test helper

Payment Methods
Cash Balance Transaction
Fund a test mode cash balance

Create an incoming testmode bank transfer

Parameters

  • amountintegerRequired

    Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the smallest currency unit (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).

  • currencyenumRequired

    Three-letter ISO currency code, in lowercase. Must be a supported currency.

More parameters

  • referencestring

    A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe’s reconciliation algorithm applies to different user inputs.

Returns

Returns a specific cash balance transaction, which funded the customer’s cash balance.

POST /v1/test_helpers/customers/:id/fund_cash_balance
curl https://api.stripe.com/v1/test_helpers/customers/cus_9s6XKzkNRiz8i3/fund_cash_balance \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d amount=5000 \
-d currency=eur
Response
{
"id": "ccsbtxn_1NlhIV2eZvKYlo2CKwRcXkii",
"object": "customer_cash_balance_transaction",
"created": 1693612963,
"currency": "eur",
"customer": "cus_9s6XKzkNRiz8i3",
"ending_balance": 10000,
"funded": {
"bank_transfer": {
"eu_bank_transfer": {
"bic": "BANKDEAAXXX",
"iban_last4": "7089",
"sender_name": "Sample Business GmbH"
},
"reference": "Payment for Invoice 28278FC-155",
"type": "eu_bank_transfer"
}
},
"livemode": false,
"net_amount": 5000,
"type": "funded"
}