Retrieve details about a specific bank account stored on the Stripe account.
curl https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99 \
-u STRIPE_SECRET_KEY:
var
rest: TChilkatRest;
success: Integer;
bTls: Integer;
port: Integer;
bAutoReconnect: Integer;
sbResponseBody: TChilkatStringBuilder;
jsonResponse: TChilkatJsonObject;
id: WideString;
object: WideString;
account: WideString;
account_holder_name: WideString;
account_holder_type: WideString;
bank_name: WideString;
country: WideString;
currency: WideString;
default_for_currency: Integer;
fingerprint: WideString;
last4: WideString;
routing_number: WideString;
status: WideString;
customer: WideString;
begin
rest := TChilkatRest.Create(Self);
// URL: https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99
bTls := 1;
port := 443;
bAutoReconnect := 1;
success := rest.Connect('api.stripe.com',port,bTls,bAutoReconnect);
if (success <> 1) then
begin
Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(rest.ConnectFailReason));
Memo1.Lines.Add(rest.LastErrorText);
Exit;
end;
rest.SetAuthBasic('STRIPE_SECRET_KEY','');
sbResponseBody := TChilkatStringBuilder.Create(Self);
success := rest.FullRequestNoBodySb('GET','/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99',sbResponseBody.ControlInterface);
if (success <> 1) then
begin
Memo1.Lines.Add(rest.LastErrorText);
Exit;
end;
jsonResponse := TChilkatJsonObject.Create(Self);
jsonResponse.LoadSb(sbResponseBody.ControlInterface);
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');
{
"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"
}