Visual Basic 6.0 Stripe: Verify a Bank Account

Back to Index

Verifies a customer's bank account.

Documentation: https://stripe.com/docs/api/curl#customer_verify_bank_account

CURL Command

curl https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99/verify \
   -u STRIPE_SECRET_KEY: \
   -d amounts[]=32 \
   -d amounts[]=45 \
   -X POST

Visual Basic 6.0 Example

Dim rest As New ChilkatRest
Dim success As Long

'  URL: https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99/verify
Dim bTls As Long
bTls = 1
Dim port As Long
port = 443
Dim bAutoReconnect As Long
bAutoReconnect = 1
success = rest.Connect("api.stripe.com",port,bTls,bAutoReconnect)
If (success <> 1) Then
    Debug.Print "ConnectFailReason: " & rest.ConnectFailReason
    Debug.Print rest.LastErrorText
    Exit Sub
End If

success = rest.SetAuthBasic("STRIPE_SECRET_KEY","")

success = rest.AddQueryParam("amounts[]","32")
success = rest.AddQueryParam("amounts[]","45")

Dim strResponseBody As String
strResponseBody = rest.FullRequestFormUrlEncoded("POST","/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99/verify")
If (rest.LastMethodSuccess <> 1) Then
    Debug.Print rest.LastErrorText
    Exit Sub
End If

Dim jsonResponse As New ChilkatJsonObject
success = jsonResponse.Load(strResponseBody)

Dim id As String
Dim object 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 Long
Dim fingerprint As String
Dim last4 As String
Dim routing_number As String
Dim status As String
Dim customer As String
Dim name As String

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")

Sample JSON Response Body

{
  "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"
}