cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/refunds/{id}/retry \
--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.retry_refund(id="<id>")
# 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.retryRefund("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Refunds.RetryRefund(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.RefundResponse != nil {
// handle response
}
}{
"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>"
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Refunds
Retry refund
Use when a refund failed or is stuck pending. A failed gateway refund is retried into the customer’s wallet; an already-settled refund is rejected.
POST
/
refunds
/
{id}
/
retry
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/refunds/{id}/retry \
--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.retry_refund(id="<id>")
# 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.retryRefund("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Refunds.RetryRefund(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.RefundResponse != nil {
// handle response
}
}{
"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>"
}{
"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>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Refund ID
Response
OK
Show child attributes
Show child attributes
Available options:
GATEWAY, WALLET, OUT_OF_BAND Available options:
DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER, ORDER_CHANGE, SERVICE_ISSUE, OTHER Available options:
PENDING, PROCESSING, SUCCEEDED, FAILED, CANCELLED Available options:
published, deleted, archived 
