Sample code for 30+ languages & platforms
Classic ASP Requires Chilkat v11.7.0+

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 Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

'  Requires an unlocked Chilkat bundle. See Global Unlock Sample.
'  Supply a restricted sandbox key from merchant-controlled configuration.
apiKey = "YOUR_STRIPE_TEST_KEY"

set curl = Server.CreateObject("Chilkat.HttpCurl")
set cmd = Server.CreateObject("Chilkat.StringBuilder")
set json = Server.CreateObject("Chilkat.JsonObject")

set lookupKey = Server.CreateObject("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 <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( "No HTTP response. Chilkat failure code: " & curl.FailReason) & "</pre>"
    Response.End
End If

success = curl.GetResponseJson(json)
If ((curl.StatusCode <> 200) Or (success <> 1)) Then
    Response.Write "<pre>" & Server.HTMLEncode( "Stripe HTTP " & curl.StatusCode & "  Request-Id: " & curl.GetResponseHeaderField("Request-Id")) & "</pre>"
    If (success = 1) Then
        Response.Write "<pre>" & Server.HTMLEncode( json.StringOf("error.message")) & "</pre>"
    End If

    Response.End
End If

If ((json.SizeOfArray("data") <> 1) Or (json.BoolOf("has_more") = 1)) Then
    Response.Write "<pre>" & Server.HTMLEncode( "Expected one active price for this lookup key.") & "</pre>"
    Response.End
End If

Response.Write "<pre>" & Server.HTMLEncode( "id = " & json.StringOf("data[0].id")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "lookup_key = " & json.StringOf("data[0].lookup_key")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "currency = " & json.StringOf("data[0].currency")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "unit_amount_decimal = " & json.StringOf("data[0].unit_amount_decimal")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "type = " & json.StringOf("data[0].type")) & "</pre>"

%>
</body>
</html>