pub struct X402VerifyPaymentRejection {
pub invalid_message: Option<String>,
pub invalid_reason: X402VerifyInvalidReason,
pub is_valid: bool,
pub payer: Option<X402VerifyPaymentRejectionPayer>,
}Expand description
The result when x402 payment verification fails.
JSON schema
{
"description": "The result when x402 payment verification fails.",
"examples": [
{
"invalidMessage": "Insufficient funds",
"invalidReason": "insufficient_funds",
"isValid": false,
"payer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}
],
"type": "object",
"required": [
"invalidReason",
"isValid"
],
"properties": {
"invalidMessage": {
"description": "The message describing the invalid reason.",
"examples": [
"Insufficient funds"
],
"type": "string"
},
"invalidReason": {
"$ref": "#/components/schemas/x402VerifyInvalidReason"
},
"isValid": {
"description": "Indicates whether the payment is valid.",
"examples": [
false
],
"type": "boolean"
},
"payer": {
"description": "The onchain address of the client that is paying for the resource.\n\nFor EVM networks, the payer will be a 0x-prefixed, checksum EVM address.\n\nFor Solana-based networks, the payer will be a base58-encoded Solana address.",
"examples": [
"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
],
"type": "string",
"pattern": "^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
}
}
}Fields§
§invalid_message: Option<String>The message describing the invalid reason.
invalid_reason: X402VerifyInvalidReason§is_valid: boolIndicates whether the payment is valid.
payer: Option<X402VerifyPaymentRejectionPayer>The onchain address of the client that is paying for the resource.
For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
For Solana-based networks, the payer will be a base58-encoded Solana address.Implementations§
Source§impl X402VerifyPaymentRejection
impl X402VerifyPaymentRejection
pub fn builder() -> X402VerifyPaymentRejection
Trait Implementations§
Source§impl Clone for X402VerifyPaymentRejection
impl Clone for X402VerifyPaymentRejection
Source§fn clone(&self) -> X402VerifyPaymentRejection
fn clone(&self) -> X402VerifyPaymentRejection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for X402VerifyPaymentRejection
impl Debug for X402VerifyPaymentRejection
Source§impl<'de> Deserialize<'de> for X402VerifyPaymentRejection
impl<'de> Deserialize<'de> for X402VerifyPaymentRejection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&X402VerifyPaymentRejection> for X402VerifyPaymentRejection
impl From<&X402VerifyPaymentRejection> for X402VerifyPaymentRejection
Source§fn from(value: &X402VerifyPaymentRejection) -> Self
fn from(value: &X402VerifyPaymentRejection) -> Self
Converts to this type from the input type.
Source§impl From<X402VerifyPaymentRejection> for X402VerifyPaymentRejection
impl From<X402VerifyPaymentRejection> for X402VerifyPaymentRejection
Source§fn from(value: X402VerifyPaymentRejection) -> Self
fn from(value: X402VerifyPaymentRejection) -> Self
Converts to this type from the input type.
Source§impl TryFrom<X402VerifyPaymentRejection> for X402VerifyPaymentRejection
impl TryFrom<X402VerifyPaymentRejection> for X402VerifyPaymentRejection
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402VerifyPaymentRejection) -> Result<Self, ConversionError>
fn try_from(value: X402VerifyPaymentRejection) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402VerifyPaymentRejection
impl RefUnwindSafe for X402VerifyPaymentRejection
impl Send for X402VerifyPaymentRejection
impl Sync for X402VerifyPaymentRejection
impl Unpin for X402VerifyPaymentRejection
impl UnsafeUnpin for X402VerifyPaymentRejection
impl UnwindSafe for X402VerifyPaymentRejection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more