pub struct X402BatchSettlementRefundPayload {
pub amount: Option<X402BatchSettlementRefundPayloadAmount>,
pub channel_config: X402BatchSettlementChannelConfig,
pub claim_authorizer_signature: Option<X402BatchSettlementRefundPayloadClaimAuthorizerSignature>,
pub claims: Vec<X402BatchSettlementClaim>,
pub refund_authorizer_signature: Option<X402BatchSettlementRefundPayloadRefundAuthorizerSignature>,
pub refund_nonce: Option<X402BatchSettlementRefundPayloadRefundNonce>,
pub type_: X402BatchSettlementRefundPayloadType,
pub voucher: X402BatchSettlementVoucher,
}Expand description
A cooperative refund request. The client emits the minimal shape (just channelConfig and voucher, with an optional amount). A mediating server enriches the payload with amount, refundNonce, and claims before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent. Field presence determines which shape was sent; the facilitator dispatches accordingly.
JSON schema
{
"title": "x402BatchSettlementRefundPayload",
"description": "A cooperative refund request. The client emits the minimal shape (just `channelConfig` and `voucher`, with an optional `amount`). A mediating server enriches the payload with `amount`, `refundNonce`, and `claims` before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent. Field presence determines which shape was sent; the facilitator dispatches accordingly.",
"examples": [
{
"amount": "1000000",
"channelConfig": {
"payer": "0x857b06519E91e3A54538791bDbb0E22373e36b66",
"payerAuthorizer": "0x857b06519E91e3A54538791bDbb0E22373e36b66",
"receiver": "0x209693Bc6afc0C5328bA36FaF03C514EF312287C",
"receiverAuthorizer": "0x1111111111111111111111111111111111111111",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000001",
"token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"withdrawDelay": 86400
},
"type": "refund",
"voucher": {
"channelId": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"maxClaimableAmount": "5000000",
"signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f134801234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
}
],
"type": "object",
"required": [
"channelConfig",
"type",
"voucher"
],
"properties": {
"amount": {
"description": "The refund amount in atomic units of `channelConfig.token`. Optional in the client-emitted shape (defaults to the full remaining channel balance). Required when the payload is enriched by a mediating server.",
"examples": [
"1000000"
],
"type": "string",
"pattern": "^[0-9]+$"
},
"channelConfig": {
"$ref": "#/components/schemas/x402BatchSettlementChannelConfig"
},
"claimAuthorizerSignature": {
"description": "Optional EIP-712 signature from the receiver authorizer over the included claims. When omitted, the facilitator auto-signs.",
"type": "string",
"pattern": "^0x[0-9a-fA-F]+$"
},
"claims": {
"description": "Voucher claims to include atomically with the refund. Only present on the server-enriched shape.",
"type": "array",
"items": {
"$ref": "#/components/schemas/x402BatchSettlementClaim"
}
},
"refundAuthorizerSignature": {
"description": "Optional EIP-712 signature from the receiver authorizer over the refund. When omitted, the facilitator auto-signs.",
"type": "string",
"pattern": "^0x[0-9a-fA-F]+$"
},
"refundNonce": {
"description": "The on-chain refund nonce for replay protection (uint256 as decimal string). Only present on the server-enriched shape.",
"examples": [
"1"
],
"type": "string",
"pattern": "^[0-9]+$"
},
"type": {
"description": "The payload-type discriminator. Must be `\"refund\"` for both the client-emitted and server-enriched shape.",
"type": "string",
"enum": [
"refund"
]
},
"voucher": {
"$ref": "#/components/schemas/x402BatchSettlementVoucher"
}
}
}Fields§
§amount: Option<X402BatchSettlementRefundPayloadAmount>The refund amount in atomic units of channelConfig.token. Optional in the client-emitted shape (defaults to the full remaining channel balance). Required when the payload is enriched by a mediating server.
channel_config: X402BatchSettlementChannelConfigOptional EIP-712 signature from the receiver authorizer over the included claims. When omitted, the facilitator auto-signs.
claims: Vec<X402BatchSettlementClaim>Voucher claims to include atomically with the refund. Only present on the server-enriched shape.
Optional EIP-712 signature from the receiver authorizer over the refund. When omitted, the facilitator auto-signs.
refund_nonce: Option<X402BatchSettlementRefundPayloadRefundNonce>The on-chain refund nonce for replay protection (uint256 as decimal string). Only present on the server-enriched shape.
type_: X402BatchSettlementRefundPayloadTypeThe payload-type discriminator. Must be "refund" for both the client-emitted and server-enriched shape.
voucher: X402BatchSettlementVoucherImplementations§
Trait Implementations§
Source§impl Clone for X402BatchSettlementRefundPayload
impl Clone for X402BatchSettlementRefundPayload
Source§fn clone(&self) -> X402BatchSettlementRefundPayload
fn clone(&self) -> X402BatchSettlementRefundPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more