Get
Get a refund for the authenticated merchant.
Usage notes#
Requires refunds:read. Use the opaque refund id returned by create or list, unchanged. This endpoint reads both API-created refunds and individual returns confirmed in Dashboard or Admin. payment_id identifies the incoming payment when known; refund_request_id groups returns authorized together. Returned states are pending, processing, confirming, completed, failed, and reversed. Internal review states are presented as processing; they do not authorize a replacement request.
The REST response's actual network_fee has no currency/network fields. Do not assume it is in the refund asset: the refund.completed webhook supplies the fee denomination. A refund.reversed event reports a completed return losing chain confirmation. Reconcile delivery before creating a replacement; a later re-inclusion does not automatically rebook the refund.
For a payment not credited to the merchant, held customer funds supply principal and merchant_debit_amount covers charges only. Its actual network_fee is null when unavailable. Poll this resource for execution progress; existing refund webhooks do not cover these returns.
/v1/refunds/{refundID}curl --request GET 'https://api.thehalfin.com/v1/refunds/00000000-0000-4000-8000-000000000001' \
--header "X-API-Key: $HALFIN_API_KEY"Authorization
X-API-KeystringRequiredAPI key issued by the merchant dashboard. The key's environment (live/test) determines which data the caller can access. Permissions on the key control which endpoints are reachable.Example:
$HALFIN_API_KEY
Path Parameters
refundIDstringRequiredOpaque refund identifier returned by create or list. Pass it unchanged.- Minimum length: 36
- Maximum length: 80
- Pattern: ^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|return_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
Example:
00000000-0000-4000-8000-000000000001
Response Body
200 Refund detail.
application/json
dataobjectRequired- Unknown properties are rejected
Example:
{"id":"00000000-0000-0000-0000-000000000004","invoice_id":"00000000-0000-0000-0000-000000000003","payout_id":"00000000-0000-0000-0000-000000000004","currency":"USDC","network":"ethereum","amount":"5.00","recipient_amount":"5.00","merchant_debit_amount":"5.10","refund_fee":"0.10","refund_fee_allocation":"merchant","network_fee":null,"configured_network_fee_amount":"0.00","network_fee_allocation":"platform","destination":"0x0000000000000000000000000000000000000001","destination_tag":null,"status":"pending","environment":"live","tx_hash":null,"failure_reason":null,"description":"Partial refund for order 1001","metadata":null,"completed_at":null,"created_at":"2026-09-14T10:00:00Z","payment_id":null,"refund_request_id":null}idstringRequiredOpaque refund identifier. Save and pass it unchanged to GET refund.- Maximum length: 80
Example:
stringinvoice_idstringRequiredInvoice UUID being refunded.- Format: uuid
Example:
00000000-0000-0000-0000-000000000001payment_idstring | nullRequiredOriginal incoming payment. Null for invoice-level API refunds without payment attribution.- Format: uuid
Example:
nullrefund_request_idstring | nullRequiredGroups refunds authorized by one manual confirmation. Null for individually created API refunds.- Format: uuid
Example:
nullpayout_idstringRequiredCompatibility identifier equal to this refund's ID. It does not identify a separate payout.- Maximum length: 80
Example:
stringcurrencystringRequiredRefunded asset currency.Example:
stringnetworkstringRequiredRefunded asset network.Example:
stringamountstringRequiredBase/requested refund amount as a decimal string.Example:
1recipient_amountstringRequiredAmount sent to the customer after customer-allocated commercial charges.- Format: decimal
- Pattern: ^\d+(\.\d+)?$
Example:
1merchant_debit_amountstringRequiredAuthorized merchant debit including merchant-paid charges. For a payment not credited to the merchant, its held funds supply principal and this amount covers charges only. Failed or reversed execution can release or reverse the debit.- Format: decimal
- Pattern: ^\d+(\.\d+)?$
Example:
1refund_feestringRequiredDecimal string platform refund fee in refund currency.Example:
1refund_fee_allocation"customer" | "merchant" | "platform"RequiredExample:
customernetwork_feestring | nullRequiredDecimal string actual on-chain network fee when available; null when unavailable, including returns of funds that were not credited to the merchant balance.Example:
nullconfigured_network_fee_amountstringRequiredSnapshotted commercial network charge; distinct from actual on-chain cost.- Format: decimal
- Pattern: ^\d+(\.\d+)?$
Example:
1network_fee_allocation"customer" | "merchant" | "platform"RequiredExample:
customerdestinationstringRequiredDestination blockchain address.Example:
stringdestination_tagstring | nullRequiredMemo/tag if applicable.Example:
nullstatus"pending" | "processing" | "confirming" | "completed" | "failed" | "reversed"RequiredRefund execution status.Example:
pendingenvironment"live" | "test"RequiredEnvironment this refund belongs to.Example:
livetx_hashstring | nullRequiredOn-chain transaction hash after completion.Example:
nullfailure_reasonstring | nullRequiredMerchant-facing reason when the refund fails. A rejected destination is reported as destination_rejected; other failures are reported as internal_error. Null while processing or after completion.Example:
nulldescriptionstring | nullRequiredRefund description.Example:
nullmetadataobject | nullRequiredMerchant-supplied metadata.Example:
null[key]stringOptionalExample:
string
completed_atstring | nullRequiredCompletion timestamp.- Format: date-time
Example:
nullcreated_atstringRequiredCreation timestamp.- Format: date-time
Example:
2026-01-01T00:00:00Z
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"data": {
"id": "00000000-0000-0000-0000-000000000004",
"invoice_id": "00000000-0000-0000-0000-000000000003",
"payout_id": "00000000-0000-0000-0000-000000000004",
"currency": "USDC",
"network": "ethereum",
"amount": "5.00",
"recipient_amount": "5.00",
"merchant_debit_amount": "5.10",
"refund_fee": "0.10",
"refund_fee_allocation": "merchant",
"network_fee": null,
"configured_network_fee_amount": "0.00",
"network_fee_allocation": "platform",
"destination": "0x0000000000000000000000000000000000000001",
"destination_tag": null,
"status": "pending",
"environment": "live",
"tx_hash": null,
"failure_reason": null,
"description": "Partial refund for order 1001",
"metadata": null,
"completed_at": null,
"created_at": "2026-09-14T10:00:00Z",
"payment_id": null,
"refund_request_id": null
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}400 `validation_error`: The request format, parameters, headers, or field values are invalid.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"validation_error","message":"string","details":["string"]}code"validation_error"Required`validation_error`: The request format, parameters, headers, or field values are invalid.Example:
validation_errormessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "validation_error",
"message": "Request validation failed"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}401 `unauthorized`: A valid API key is required.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"unauthorized","message":"string","details":["string"]}code"unauthorized"Required`unauthorized`: A valid API key is required.Example:
unauthorizedmessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}403 `forbidden`: The API key does not have permission for this operation. `api_key_ip_forbidden`: The request source address is not allowed by the API key.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"forbidden","message":"string","details":["string"]}code"forbidden" | "api_key_ip_forbidden"Required`forbidden`: The API key does not have permission for this operation. `api_key_ip_forbidden`: The request source address is not allowed by the API key.Example:
forbiddenmessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "forbidden",
"message": "Permission denied"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}404 `not_found`: The refund was not found in the API key's merchant and environment scope.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"not_found","message":"string","details":["string"]}code"not_found"Required`not_found`: The refund was not found in the API key's merchant and environment scope.Example:
not_foundmessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "not_found",
"message": "Resource not found"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}500 `internal_error`: The API could not complete the request. Contact support with the request ID if the error persists.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"internal_error","message":"string","details":["string"]}code"internal_error"Required`internal_error`: The API could not complete the request. Contact support with the request ID if the error persists.Example:
internal_errormessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "internal_error",
"message": "Internal server error"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}503 `service_unavailable`: The service is temporarily unavailable. Retry later.
application/json
errorobjectRequiredThe error code and diagnostic message.- Unknown properties are rejected
Example:
{"code":"service_unavailable","message":"string","details":["string"]}code"service_unavailable"Required`service_unavailable`: The service is temporarily unavailable. Retry later.Example:
service_unavailablemessagestringRequiredHuman-readable description of the error.Example:
stringdetailsarray<string>OptionalOptional structured context (validation errors, etc.).Example:
["string"]
metaobjectRequired- Unknown properties are rejected
Example:
{"request_id":"00000000-0000-0000-0000-000000000001"}request_idstringRequiredCorrelation identifier issued by the API, also returned in the X-Request-ID response header. Client-supplied X-Request-ID values are replaced.Example:
string
{
"error": {
"code": "service_unavailable",
"message": "Service temporarily unavailable"
},
"meta": {
"request_id": "00000000-0000-0000-0000-000000000001"
}
}