Returns a list of all refunds you’ve previously created.
curl https://api.stripe.com/v1/refunds?limit=3 \
-u STRIPE_SECRET_KEY: \
-G
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set rest = Server.CreateObject("Chilkat_9_5_0.Rest")
' URL: https://api.stripe.com/v1/refunds?limit=3
bTls = 1
port = 443
bAutoReconnect = 1
success = rest.Connect("api.stripe.com",port,bTls,bAutoReconnect)
If (success <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( "ConnectFailReason: " & rest.ConnectFailReason) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( rest.LastErrorText) & "</pre>"
End If
success = rest.SetAuthBasic("STRIPE_SECRET_KEY","")
set sbResponseBody = Server.CreateObject("Chilkat_9_5_0.StringBuilder")
success = rest.FullRequestNoBodySb("GET","/v1/refunds?limit=3",sbResponseBody)
If (success <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( rest.LastErrorText) & "</pre>"
End If
set jsonResponse = Server.CreateObject("Chilkat_9_5_0.JsonObject")
success = jsonResponse.LoadSb(sbResponseBody)
object = jsonResponse.StringOf("object")
url = jsonResponse.StringOf("url")
has_more = jsonResponse.BoolOf("has_more")
i = 0
count_i = jsonResponse.SizeOfArray("data")
Do While i < count_i
jsonResponse.I = i
id = jsonResponse.StringOf("data[i].id")
object = jsonResponse.StringOf("data[i].object")
amount = jsonResponse.IntOf("data[i].amount")
balance_transaction = jsonResponse.IsNullOf("data[i].balance_transaction")
charge = jsonResponse.StringOf("data[i].charge")
created = jsonResponse.IntOf("data[i].created")
currency = jsonResponse.StringOf("data[i].currency")
reason = jsonResponse.IsNullOf("data[i].reason")
receipt_number = jsonResponse.IsNullOf("data[i].receipt_number")
status = jsonResponse.StringOf("data[i].status")
i = i + 1
Loop
%>
</body>
</html>
{
"object": "list",
"url": "/v1/refunds",
"has_more": false,
"data": [
{
"id": "re_1BnETKGswQrCoh0XT2qLx7S0",
"object": "refund",
"amount": 100,
"balance_transaction": null,
"charge": "ch_1BnETKGswQrCoh0XE7kJI2wj",
"created": 1516662782,
"currency": "usd",
"metadata": {},
"reason": null,
"receipt_number": null,
"status": "succeeded"
}
]
}