pub struct Refund {Show 13 fields
pub amount: Option<String>,
pub created_at: Option<DateTime<Utc>>,
pub customer_display: Option<OperationCustomerDisplay>,
pub error: Option<PaymentError>,
pub external_reference_id: Option<ExternalReferenceId>,
pub metadata: Option<Metadata>,
pub onchain_transactions: Vec<OnchainTransaction>,
pub payment_session_id: Option<PaymentSessionId>,
pub reason: Option<String>,
pub refund_id: Option<RefundId>,
pub source: Option<RefundSource>,
pub status: Option<PaymentActionStatus>,
pub updated_at: Option<DateTime<Utc>>,
}Expand description
A return of previously captured funds to the payer. Multiple partial refunds are allowed up to the total captured amount.
JSON schema
{
"description": "A return of previously captured funds to the payer. Multiple partial refunds are allowed up to the total captured amount.",
"examples": [
{
"amount": "0.50",
"createdAt": "2025-06-15T12:40:00.000Z",
"metadata": {
"customer_id": "cust_12345"
},
"onchainTransactions": [
{
"network": "base",
"transactionHash": "0x012345678901234567890abcdef1234567890abcdef1234567890abcdef1234"
}
],
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"reason": "Customer returned the item.",
"refundId": "refund_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"source": {
"accountId": "account_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"asset": "usdc"
},
"status": "succeeded",
"updatedAt": "2025-06-15T12:41:00.000Z"
}
],
"type": "object",
"properties": {
"amount": {
"description": "A decimal representation of the refunded amount, denominated in the session's `asset`.",
"examples": [
"0.50"
],
"type": "string"
},
"createdAt": {
"description": "The UTC ISO 8601 timestamp at which the refund was created.",
"examples": [
"2025-06-15T12:40:00.000Z"
],
"type": "string",
"format": "date-time"
},
"customerDisplay": {
"description": "Customer-facing display data for this refund, shown to the payer. Present when supplied on the create refund request or when the session's `orderCode` fallback applies; otherwise omitted.",
"allOf": [
{
"$ref": "#/components/schemas/OperationCustomerDisplay"
}
]
},
"error": {
"$ref": "#/components/schemas/PaymentError"
},
"externalReferenceId": {
"description": "A merchant-provided internal identifier for this refund, from the merchant's own system—not visible to the payer. Present only when supplied on the create refund request.",
"examples": [
"merchant-refund-abc123"
],
"allOf": [
{
"$ref": "#/components/schemas/ExternalReferenceId"
}
]
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"onchainTransactions": {
"description": "The onchain transactions associated with this refund.",
"examples": [
[
{
"network": "base",
"transactionHash": "0x012345678901234567890abcdef1234567890abcdef1234567890abcdef1234"
}
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/OnchainTransaction"
}
},
"paymentSessionId": {
"description": "The ID of the payment session this refund belongs to.",
"examples": [
"paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad"
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentSessionId"
}
]
},
"reason": {
"description": "The reason for the refund.",
"examples": [
"Customer returned the item."
],
"type": "string"
},
"refundId": {
"description": "The unique identifier of the refund.",
"examples": [
"refund_82c879c1-84e1-44ed-a8c2-1ac239cf09ad"
],
"allOf": [
{
"$ref": "#/components/schemas/RefundId"
}
]
},
"source": {
"description": "The source from which the refund is funded. Can be a CDP account or an onchain address.",
"examples": [
{
"accountId": "account_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"asset": "usdc"
}
],
"allOf": [
{
"$ref": "#/components/schemas/RefundSource"
}
]
},
"status": {
"description": "The current status of the refund.",
"examples": [
"pending"
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentActionStatus"
}
]
},
"updatedAt": {
"description": "The UTC ISO 8601 timestamp at which the refund was last updated.",
"examples": [
"2025-06-15T12:41:00.000Z"
],
"type": "string",
"format": "date-time"
}
}
}Fields§
§amount: Option<String>A decimal representation of the refunded amount, denominated in the session’s asset.
created_at: Option<DateTime<Utc>>The UTC ISO 8601 timestamp at which the refund was created.
customer_display: Option<OperationCustomerDisplay>Customer-facing display data for this refund, shown to the payer. Present when supplied on the create refund request or when the session’s orderCode fallback applies; otherwise omitted.
error: Option<PaymentError>§external_reference_id: Option<ExternalReferenceId>A merchant-provided internal identifier for this refund, from the merchant’s own system—not visible to the payer. Present only when supplied on the create refund request.
metadata: Option<Metadata>§onchain_transactions: Vec<OnchainTransaction>The onchain transactions associated with this refund.
payment_session_id: Option<PaymentSessionId>The ID of the payment session this refund belongs to.
reason: Option<String>The reason for the refund.
refund_id: Option<RefundId>The unique identifier of the refund.
source: Option<RefundSource>The source from which the refund is funded. Can be a CDP account or an onchain address.
status: Option<PaymentActionStatus>The current status of the refund.
updated_at: Option<DateTime<Utc>>The UTC ISO 8601 timestamp at which the refund was last updated.