cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/refunds \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.refunds.list_refunds()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.refunds.listRefunds();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Refunds.ListRefunds(ctx, dtos.ListRefundsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListRefundsResponse != nil {
// handle response
}
}{
"items": [
{
"amount": "<string>",
"attempt": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_note_id": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"gateway_idempotency_token": "<string>",
"gateway_metadata": {},
"gateway_refund_id": "<string>",
"gateway_tracking_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"initiated_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"metadata": {},
"payment_gateway": "<string>",
"payment_id": "<string>",
"refund_destination": "GATEWAY",
"refund_destination_id": "<string>",
"refund_reason": "DUPLICATE",
"refund_status": "PENDING",
"settled_amount": "<string>",
"status": "published",
"succeeded_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Refunds
List refunds
Use to see where refunded money actually went and whether it has settled. Filter by invoice_ids to get every settlement row for one invoice.
GET
/
refunds
cURL
curl --request GET \
--url https://us.api.flexprice.io/v1/refunds \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.refunds.list_refunds()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.refunds.listRefunds();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Refunds.ListRefunds(ctx, dtos.ListRefundsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListRefundsResponse != nil {
// handle response
}
}{
"items": [
{
"amount": "<string>",
"attempt": 123,
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_note_id": "<string>",
"currency": "<string>",
"environment_id": "<string>",
"failed_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"gateway_idempotency_token": "<string>",
"gateway_metadata": {},
"gateway_refund_id": "<string>",
"gateway_tracking_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"initiated_at": "2023-11-07T05:31:56Z",
"invoice_id": "<string>",
"metadata": {},
"payment_gateway": "<string>",
"payment_id": "<string>",
"refund_destination": "GATEWAY",
"refund_destination_id": "<string>",
"refund_reason": "DUPLICATE",
"refund_status": "PENDING",
"settled_amount": "<string>",
"status": "published",
"succeeded_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Query Parameters
Filter by invoice IDs
Filter by payment IDs
Filter by credit note IDs
Filter by refund status
Filter by refund destination
Filter by payment gateway
Only refunds that have settled
Limit
Offset

