Xojo Plugin Requires Chilkat v11.7.0+
Xojo Plugin
Stripe: Find a catalog price by its lookup key
See more Stripe Examples
Retrieve an active price by its catalog lookup key and read its price ID, currency, amount, and billing type.
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
Dim lookupKey As New Chilkat.StringBuilder
success = lookupKey.SetString("support_monthly_usd")
// curl -X GET "https://api.stripe.com/v1/prices?active=true&lookup_keys%5B%5D={lookupKey}&limit=2" \
// -u "$STRIPE_API_KEY:" \
// -H "Stripe-Version: 2026-10-28.endive"
success = cmd.SetString("curl -X GET ""https://api.stripe.com/v1/prices?active=true&lookup_keys%5B%5D=@LOOKUP@&limit=2""")
success = cmd.Append(" -u ""@KEY@:""")
success = cmd.Append(" -H ""Stripe-Version: 2026-10-28.endive""")
replaced = cmd.Replace("@LOOKUP@",lookupKey.GetEncoded("url_rfc3986","utf-8"))
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
If ((json.SizeOfArray("data") <> 1) Or (json.BoolOf("has_more") = True)) Then
System.DebugLog("Expected one active price for this lookup key.")
Return
End If
System.DebugLog("id = " + json.StringOf("data[0].id"))
System.DebugLog("lookup_key = " + json.StringOf("data[0].lookup_key"))
System.DebugLog("currency = " + json.StringOf("data[0].currency"))
System.DebugLog("unit_amount_decimal = " + json.StringOf("data[0].unit_amount_decimal"))
System.DebugLog("type = " + json.StringOf("data[0].type"))