Supported Filters
Key | Value | Required | Notes |
---|---|---|---|
transaction-id | UUID | ||
amount | Integer | ||
memo | String | ||
status | String | See Valid Statuses | |
metadata | Metadata | See Filtering By Metadata | |
created-between | TimestampFilter | ISO-8601 UTC Timestamp. See Filtering By Timestamps | |
updated-between | TimestampFilter | ISO-8601 UTC Timestamp. See Filtering By Timestamps |
Get a List of Refunds
Returns a Collection of RefundResponse object.
require 'uri'
require 'net/http'
url = URI("https://api.opentransact.com/v1/refunds?scope[type]=applications&scope[id]=#{application_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"
response = http.request(request)
puts response.read_body
curl --request GET \
--url https://api.opentransact.com/v1/refunds?scope[type]=applications&scope[id]=$APPLICATION_ID \
--header 'authorization: Bearer $API_KEY'
Get Refunds for a specific Transaction
Returns a Collection of RefundResponse object.
require 'uri'
require 'net/http'
url = URI("https://api.opentransact.com/v1/refunds?scope-type=applications&scope-id=#{application_id}&filter[transaction-id]=#{transaction_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"
response = http.request(request)
puts response.read_body
curl --request GET \
--url https://api.opentransact.com/v1/refunds?scope-type=applications&scope-id=$APPLICATION_ID&filter[transaction-id]=$TRANSACTION_ID \
--header 'authorization: Bearer $API_KEY'