pub struct X402SettlePaymentRejection {
pub error_message: Option<String>,
pub error_reason: X402SettleErrorReason,
pub network: Option<String>,
pub payer: Option<X402SettlePaymentRejectionPayer>,
pub success: bool,
pub transaction: Option<X402SettlePaymentRejectionTransaction>,
}Expand description
The result when x402 payment settlement fails.
JSON schema
{
"description": "The result when x402 payment settlement fails.",
"examples": [
{
"errorReason": "insufficient_funds",
"payer": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"success": false
}
],
"type": "object",
"required": [
"errorReason",
"success"
],
"properties": {
"errorMessage": {
"description": "The message describing the error reason.",
"examples": [
"Insufficient funds"
],
"type": "string"
},
"errorReason": {
"$ref": "#/components/schemas/x402SettleErrorReason"
},
"network": {
"description": "The network where the settlement occurred.",
"examples": [
"base"
],
"type": "string"
},
"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})$"
},
"success": {
"description": "Indicates whether the payment settlement is successful.",
"examples": [
false
],
"type": "boolean"
},
"transaction": {
"description": "The transaction of the settlement.\nFor EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.\nFor Solana-based networks, the transaction will be a base58-encoded Solana signature.",
"examples": [
"0x89c91c789e57059b17285e7ba1716a1f5ff4c5dace0ea5a5135f26158d0421b9"
],
"type": "string",
"pattern": "^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$"
}
}
}Fields§
§error_message: Option<String>The message describing the error reason.
error_reason: X402SettleErrorReason§network: Option<String>The network where the settlement occurred.
payer: Option<X402SettlePaymentRejectionPayer>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.success: boolIndicates whether the payment settlement is successful.
transaction: Option<X402SettlePaymentRejectionTransaction>The transaction of the settlement. For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash. For Solana-based networks, the transaction will be a base58-encoded Solana signature.
Implementations§
Source§impl X402SettlePaymentRejection
impl X402SettlePaymentRejection
pub fn builder() -> X402SettlePaymentRejection
Trait Implementations§
Source§impl Clone for X402SettlePaymentRejection
impl Clone for X402SettlePaymentRejection
Source§fn clone(&self) -> X402SettlePaymentRejection
fn clone(&self) -> X402SettlePaymentRejection
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 X402SettlePaymentRejection
impl Debug for X402SettlePaymentRejection
Source§impl<'de> Deserialize<'de> for X402SettlePaymentRejection
impl<'de> Deserialize<'de> for X402SettlePaymentRejection
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<&X402SettlePaymentRejection> for X402SettlePaymentRejection
impl From<&X402SettlePaymentRejection> for X402SettlePaymentRejection
Source§fn from(value: &X402SettlePaymentRejection) -> Self
fn from(value: &X402SettlePaymentRejection) -> Self
Converts to this type from the input type.
Source§impl From<X402SettlePaymentRejection> for X402SettlePaymentRejection
impl From<X402SettlePaymentRejection> for X402SettlePaymentRejection
Source§fn from(value: X402SettlePaymentRejection) -> Self
fn from(value: X402SettlePaymentRejection) -> Self
Converts to this type from the input type.
Source§impl TryFrom<X402SettlePaymentRejection> for X402SettlePaymentRejection
impl TryFrom<X402SettlePaymentRejection> for X402SettlePaymentRejection
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402SettlePaymentRejection) -> Result<Self, ConversionError>
fn try_from(value: X402SettlePaymentRejection) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402SettlePaymentRejection
impl RefUnwindSafe for X402SettlePaymentRejection
impl Send for X402SettlePaymentRejection
impl Sync for X402SettlePaymentRejection
impl Unpin for X402SettlePaymentRejection
impl UnsafeUnpin for X402SettlePaymentRejection
impl UnwindSafe for X402SettlePaymentRejection
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