pub struct Authorization {Show 13 fields
pub amount: Option<String>,
pub authorization_id: Option<AuthorizationId>,
pub created_at: Option<DateTime<Utc>>,
pub customer_display: Option<OperationCustomerDisplay>,
pub error: Option<PaymentError>,
pub external_reference_id: Option<ExternalReferenceId>,
pub message: Option<String>,
pub metadata: Option<Metadata>,
pub onchain_transactions: Vec<OnchainTransaction>,
pub payment_session_id: Option<PaymentSessionId>,
pub source: Option<PaymentSessionSource>,
pub status: Option<PaymentActionStatus>,
pub updated_at: Option<DateTime<Utc>>,
}Expand description
A hold placed on the payer’s funds. Once authorized, the merchant can capture (collect) the funds. Only one authorization is allowed per session.
JSON schema
{
"description": "A hold placed on the payer's funds. Once authorized, the merchant can capture (collect) the funds. Only one authorization is allowed per session.",
"examples": [
{
"amount": "1.00",
"authorizationId": "authorization_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"createdAt": "2025-06-15T12:00:00.000Z",
"metadata": {
"customer_id": "cust_12345"
},
"onchainTransactions": [
{
"network": "base",
"transactionHash": "0xabc123def456789012345678901234567890abcdef1234567890abcdef123456"
}
],
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"source": {
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"asset": "usdc",
"network": "base"
},
"status": "succeeded",
"updatedAt": "2025-06-15T12:01:00.000Z"
}
],
"type": "object",
"properties": {
"amount": {
"description": "A decimal representation of the authorized amount, denominated in the session's `asset`.",
"examples": [
"1.00"
],
"type": "string"
},
"authorizationId": {
"description": "The unique identifier of the authorization.",
"examples": [
"authorization_82c879c1-84e1-44ed-a8c2-1ac239cf09ad"
],
"allOf": [
{
"$ref": "#/components/schemas/AuthorizationId"
}
]
},
"createdAt": {
"description": "The UTC ISO 8601 timestamp at which the authorization was created.",
"examples": [
"2025-06-15T12:00:00.000Z"
],
"type": "string",
"format": "date-time"
},
"customerDisplay": {
"description": "Customer-facing display data for this authorization, shown to the payer. Present when supplied on the authorization 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 authorization, from the merchant's own system—not visible to the payer. Present only when supplied on the authorization request.",
"examples": [
"merchant-authorization-abc123"
],
"allOf": [
{
"$ref": "#/components/schemas/ExternalReferenceId"
}
]
},
"message": {
"description": "A human-readable message describing the outcome or status for display. Returned for x402 authorizations; omitted for other authorization flows unless documented otherwise.",
"examples": [
"Your payment was successfully submitted"
],
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"onchainTransactions": {
"description": "The onchain transactions associated with this authorization.",
"examples": [
[
{
"network": "base",
"transactionHash": "0xabc123def456789012345678901234567890abcdef1234567890abcdef123456"
}
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/OnchainTransaction"
}
},
"paymentSessionId": {
"description": "The ID of the payment session this authorization belongs to.",
"examples": [
"paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad"
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentSessionId"
}
]
},
"source": {
"description": "The payer for this authorization. For wallet authorizations, this is the blockchain address that signed the payloads. For Coinbase authorizations, this is the authenticated Coinbase account. This value is also reflected on the parent payment session's `source` field after a successful authorization.",
"examples": [
{
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"asset": "usdc",
"network": "base"
}
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentSessionSource"
}
]
},
"status": {
"description": "The current status of the authorization.",
"examples": [
"pending"
],
"allOf": [
{
"$ref": "#/components/schemas/PaymentActionStatus"
}
]
},
"updatedAt": {
"description": "The UTC ISO 8601 timestamp at which the authorization was last updated.",
"examples": [
"2025-06-15T12:01:00.000Z"
],
"type": "string",
"format": "date-time"
}
}
}Fields§
§amount: Option<String>A decimal representation of the authorized amount, denominated in the session’s asset.
The unique identifier of the authorization.
created_at: Option<DateTime<Utc>>The UTC ISO 8601 timestamp at which the authorization was created.
customer_display: Option<OperationCustomerDisplay>Customer-facing display data for this authorization, shown to the payer. Present when supplied on the authorization 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 authorization, from the merchant’s own system—not visible to the payer. Present only when supplied on the authorization request.
message: Option<String>A human-readable message describing the outcome or status for display. Returned for x402 authorizations; omitted for other authorization flows unless documented otherwise.
metadata: Option<Metadata>§onchain_transactions: Vec<OnchainTransaction>The onchain transactions associated with this authorization.
payment_session_id: Option<PaymentSessionId>The ID of the payment session this authorization belongs to.
source: Option<PaymentSessionSource>The payer for this authorization. For wallet authorizations, this is the blockchain address that signed the payloads. For Coinbase authorizations, this is the authenticated Coinbase account. This value is also reflected on the parent payment session’s source field after a successful authorization.
status: Option<PaymentActionStatus>The current status of the authorization.
updated_at: Option<DateTime<Utc>>The UTC ISO 8601 timestamp at which the authorization was last updated.