pub struct Payment {Show 14 fields
pub transaction_id: String,
pub thid: Option<String>,
pub pthid: Option<String>,
pub merchant: Participant,
pub customer: Participant,
pub asset: AssetId,
pub amount: String,
pub order_details: Option<HashMap<String, Value>>,
pub timestamp: String,
pub expires: Option<String>,
pub note: Option<String>,
pub agents: Vec<Participant>,
pub metadata: HashMap<String, Value>,
pub attachments: Option<Vec<Attachment>>,
}Expand description
Represents a TAP Payment message. This message type is used to initiate a payment request.
Fields§
§transaction_id: StringUnique identifier for this payment request.
thid: Option<String>Identifier for the thread this message belongs to.
pthid: Option<String>Identifier for the parent thread, used for replies.
merchant: ParticipantThe merchant requesting the payment.
customer: ParticipantThe customer making the payment.
asset: AssetIdThe asset being transferred (e.g., currency and amount).
amount: StringThe amount requested for payment.
order_details: Option<HashMap<String, Value>>Optional details about the order or transaction.
timestamp: StringTimestamp when the payment request was created (RFC3339).
expires: Option<String>Optional expiry time for the payment request (RFC3339).
note: Option<String>Optional note from the merchant.
agents: Vec<Participant>Optional list of agents involved in processing the payment.
metadata: HashMap<String, Value>Optional metadata associated with the payment.
attachments: Option<Vec<Attachment>>Optional attachments.
Implementations§
Source§impl Payment
Helper methods for the Payment struct
impl Payment
Helper methods for the Payment struct
Sourcepub fn message_id(&self) -> String
pub fn message_id(&self) -> String
Generates a unique message ID for authorization, rejection, or settlement
Sourcepub fn require_proof_of_control(
&self,
_agent: String,
_challenge: String,
) -> RequireProofOfControl
pub fn require_proof_of_control( &self, _agent: String, _challenge: String, ) -> RequireProofOfControl
Requires proof of control from a specific agent