Updates the metadata, account_holder_name, and account_holder_type of a bank account belonging to a Customer. Other bank account details are not editable by design.
curl https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99 \
-u STRIPE_SECRET_KEY: \
-d metadata[key]=value \
-X POST
Chilkat.Rest rest = new Chilkat.Rest();
bool success;
// URL: https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99
bool bTls = true;
int port = 443;
bool bAutoReconnect = true;
success = rest.Connect("api.stripe.com",port,bTls,bAutoReconnect);
if (success != true) {
Debug.WriteLine("ConnectFailReason: " + Convert.ToString(rest.ConnectFailReason));
Debug.WriteLine(rest.LastErrorText);
return;
}
rest.SetAuthBasic("STRIPE_SECRET_KEY","");
rest.AddQueryParam("metadata[key]","value");
string strResponseBody = rest.FullRequestFormUrlEncoded("POST","/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99");
if (rest.LastMethodSuccess != true) {
Debug.WriteLine(rest.LastErrorText);
return;
}
Chilkat.JsonObject jsonResponse = new Chilkat.JsonObject();
jsonResponse.Load(strResponseBody);
string id;
string object;
string account;
string account_holder_name;
string account_holder_type;
string bank_name;
string country;
string currency;
bool default_for_currency;
string fingerprint;
string last4;
string routing_number;
string status;
string customer;
string name;
id = jsonResponse.StringOf("id");
object = jsonResponse.StringOf("object");
account = jsonResponse.StringOf("account");
account_holder_name = jsonResponse.StringOf("account_holder_name");
account_holder_type = jsonResponse.StringOf("account_holder_type");
bank_name = jsonResponse.StringOf("bank_name");
country = jsonResponse.StringOf("country");
currency = jsonResponse.StringOf("currency");
default_for_currency = jsonResponse.BoolOf("default_for_currency");
fingerprint = jsonResponse.StringOf("fingerprint");
last4 = jsonResponse.StringOf("last4");
routing_number = jsonResponse.StringOf("routing_number");
status = jsonResponse.StringOf("status");
customer = jsonResponse.StringOf("customer");
name = jsonResponse.StringOf("name");
{
"id": "ba_1BnETKGswQrCoh0XzgjB3t99",
"object": "bank_account",
"account": "acct_18qpKxGswQrCoh0X",
"account_holder_name": "Jane Austen",
"account_holder_type": "individual",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"default_for_currency": false,
"fingerprint": "L2j4aSuWk1MZMDZ5",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new",
"customer": "cus_CBbg3iRMzWBjoe",
"name": "Liam Thomas"
}