List bank accounts belonging to a customer.
curl "https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources?object=bank_account&limit=3" \
-u STRIPE_SECRET_KEY: \
-G
Dim rest As New Chilkat.Rest
Dim success As Boolean
' URL: https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources?object=bank_account&limit=3
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
success = Await rest.ConnectAsync("api.stripe.com",port,bTls,bAutoReconnect)
If (success <> True) Then
Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason)
Debug.WriteLine(rest.LastErrorText)
Exit Sub
End If
rest.SetAuthBasic("STRIPE_SECRET_KEY","")
Dim sbResponseBody As New Chilkat.StringBuilder
success = Await rest.FullRequestNoBodySbAsync("GET","/v1/customers/cus_CBbg3iRMzWBjoe/sources?object=bank_account&limit=3",sbResponseBody)
If (success <> True) Then
Debug.WriteLine(rest.LastErrorText)
Exit Sub
End If
Dim jsonResponse As New Chilkat.JsonObject
jsonResponse.LoadSb(sbResponseBody)
Dim object As String
Dim url As String
Dim has_more As Boolean
Dim i As Integer
Dim count_i As Integer
Dim id As String
Dim account As String
Dim account_holder_name As String
Dim account_holder_type As String
Dim bank_name As String
Dim country As String
Dim currency As String
Dim default_for_currency As Boolean
Dim fingerprint As String
Dim last4 As String
Dim routing_number As String
Dim status As String
Dim customer As String
object = jsonResponse.StringOf("object")
url = jsonResponse.StringOf("url")
has_more = jsonResponse.BoolOf("has_more")
i = 0
count_i = jsonResponse.SizeOfArray("data")
While i < count_i
jsonResponse.I = i
id = jsonResponse.StringOf("data[i].id")
object = jsonResponse.StringOf("data[i].object")
account = jsonResponse.StringOf("data[i].account")
account_holder_name = jsonResponse.StringOf("data[i].account_holder_name")
account_holder_type = jsonResponse.StringOf("data[i].account_holder_type")
bank_name = jsonResponse.StringOf("data[i].bank_name")
country = jsonResponse.StringOf("data[i].country")
currency = jsonResponse.StringOf("data[i].currency")
default_for_currency = jsonResponse.BoolOf("data[i].default_for_currency")
fingerprint = jsonResponse.StringOf("data[i].fingerprint")
last4 = jsonResponse.StringOf("data[i].last4")
routing_number = jsonResponse.StringOf("data[i].routing_number")
status = jsonResponse.StringOf("data[i].status")
customer = jsonResponse.StringOf("data[i].customer")
i = i + 1
End While
{
"object": "list",
"url": "/v1/customers/cus_CBbg3iRMzWBjoe/sources",
"has_more": false,
"data": [
{
"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"
}
]
}