Xojo Plugin Requires Chilkat v11.7.0+
Xojo Plugin
Stripe: Show available and pending balances by currency
See more Stripe Examples
Read the available and pending account balances for every currency returned by Stripe.
Stripe documentation and cURL example
Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
// Requires an unlocked Chilkat bundle. See Global Unlock Sample.
// Supply a restricted sandbox key from merchant-controlled configuration.
Dim apiKey As String
apiKey = "YOUR_STRIPE_TEST_KEY"
Dim curl As New Chilkat.HttpCurl
Dim cmd As New Chilkat.StringBuilder
Dim json As New Chilkat.JsonObject
Dim replaced As Int32
// curl -X GET "https://api.stripe.com/v1/balance" \
// -u "$STRIPE_API_KEY:" \
// -H "Stripe-Version: 2026-10-28.endive"
success = cmd.SetString("curl -X GET ""https://api.stripe.com/v1/balance""")
success = cmd.Append(" -u ""@KEY@:""")
success = cmd.Append(" -H ""Stripe-Version: 2026-10-28.endive""")
replaced = cmd.Replace("@KEY@",apiKey)
success = curl.DoYourThing(cmd.GetAsString())
If (success <> True) Then
System.DebugLog("No HTTP response. Chilkat failure code: " + Str(curl.FailReason))
Return
End If
success = curl.GetResponseJson(json)
If ((curl.StatusCode <> 200) Or (success <> True)) Then
System.DebugLog("Stripe HTTP " + Str(curl.StatusCode) + " Request-Id: " + curl.GetResponseHeaderField("Request-Id"))
If (success = True) Then
System.DebugLog(json.StringOf("error.message"))
End If
Return
End If
// Amounts are integer minor units. Read them as text to preserve large balances.
Dim availableIndex As Int32
availableIndex = 0
While (availableIndex < json.SizeOfArray("available"))
json.I = availableIndex
System.DebugLog("available: " + json.StringOf("available[i].amount") + " " + json.StringOf("available[i].currency"))
availableIndex = availableIndex + 1
Wend
Dim pendingIndex As Int32
pendingIndex = 0
While (pendingIndex < json.SizeOfArray("pending"))
json.I = pendingIndex
System.DebugLog("pending: " + json.StringOf("pending[i].amount") + " " + json.StringOf("pending[i].currency"))
pendingIndex = pendingIndex + 1
Wend