Skip to content

SettlementRecord

Source code in docs_src/capo_wafv2/types/settlement_record.py
class SettlementRecord(TypedDict, closed=True):
    timestamp: "capo_wafv2.types.timestamp.Timestamp"
    """<p>The timestamp when the settlement was recorded.</p>"""
    payer_address: NotRequired[
        "capo_wafv2.types.settlement_filter_string.SettlementFilterString"
    ]
    """<p>The blockchain wallet address of the paying AI agent.</p>"""
    wallet_address: NotRequired[
        "capo_wafv2.types.settlement_filter_string.SettlementFilterString"
    ]
    """<p>Your receiving wallet address.</p>"""
    status: "capo_wafv2.types.settlement_status.SettlementStatus"
    """<p>The status of the settlement. Possible values:</p> <ul> <li> <p> <code>SETTLED</code> - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The <code>TransactionId</code> field contains the on-chain transaction hash. Content is served to the client.</p> </li> <li> <p> <code>PENDING</code> - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either <code>SETTLED</code> or <code>FAILED</code>. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.</p> </li> <li> <p> <code>FAILED</code> - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The <code>failureReason</code> field contains a machine-readable error code. Content is not served.</p> </li> <li> <p> <code>SERVICE_ERROR</code> - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.</p> </li> <li> <p> <code>SKIPPED_ORIGIN_ERROR</code> - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.</p> </li> <li> <p> <code>DUPLICATE</code> - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.</p> </li> </ul>"""
    amount: "capo_wafv2.types.monetization_amount_value.MonetizationAmountValue"
    """<p>The payment amount in the specified currency.</p>"""
    currency: NotRequired["capo_wafv2.types.currency.Currency"]
    """<p>The currency of the payment amount.</p>"""
    network: NotRequired[
        "capo_wafv2.types.settlement_filter_string.SettlementFilterString"
    ]
    """<p>The blockchain network on which the settlement occurred.</p>"""
    transaction_id: NotRequired[
        "capo_wafv2.types.settlement_id_string.SettlementIdString"
    ]
    """<p>The blockchain transaction identifier. You can use this to verify the transaction on a blockchain explorer.</p>"""
    request_id: NotRequired[
        "capo_wafv2.types.settlement_filter_string.SettlementFilterString"
    ]
    """<p>The WAF request ID associated with this settlement.</p>"""
    source_name: NotRequired["capo_wafv2.types.filter_string.FilterString"]
    """<p>The name of the AI bot that made the payment.</p>"""
    organization: NotRequired["capo_wafv2.types.filter_string.FilterString"]
    """<p>The organization associated with the AI bot.</p>"""
    source_category: NotRequired["capo_wafv2.types.filter_string.FilterString"]
    """<p>The category of the AI bot source.</p>"""
    intent: NotRequired["capo_wafv2.types.filter_string.FilterString"]
    """<p>The declared intent of the AI bot request.</p>"""
    verified: "capo_wafv2.types.verified_status.VerifiedStatus"
    """<p>Whether the AI bot's identity was verified.</p>"""
    content_path: NotRequired["capo_wafv2.types.filter_string.FilterString"]
    """<p>The content path that was accessed.</p>"""
    web_acl_arn: NotRequired["capo_wafv2.types.resource_arn.ResourceArn"]
    """<p>The ARN of the web ACL that processed the request.</p>"""
    request_timestamp: NotRequired["capo_wafv2.types.timestamp.Timestamp"]
    """<p>The timestamp of the original web request.</p>"""

amount instance-attribute

The payment amount in the specified currency.

content_path instance-attribute

content_path: NotRequired[FilterString]

The content path that was accessed.

currency instance-attribute

currency: NotRequired[Currency]

The currency of the payment amount.

intent instance-attribute

intent: NotRequired[FilterString]

The declared intent of the AI bot request.

network instance-attribute

network: NotRequired[SettlementFilterString]

The blockchain network on which the settlement occurred.

organization instance-attribute

organization: NotRequired[FilterString]

The organization associated with the AI bot.

payer_address instance-attribute

payer_address: NotRequired[SettlementFilterString]

The blockchain wallet address of the paying AI agent.

request_id instance-attribute

request_id: NotRequired[SettlementFilterString]

The WAF request ID associated with this settlement.

request_timestamp instance-attribute

request_timestamp: NotRequired[Timestamp]

The timestamp of the original web request.

source_category instance-attribute

source_category: NotRequired[FilterString]

The category of the AI bot source.

source_name instance-attribute

source_name: NotRequired[FilterString]

The name of the AI bot that made the payment.

status instance-attribute

The status of the settlement. Possible values:

  • SETTLED - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The TransactionId field contains the on-chain transaction hash. Content is served to the client.

  • PENDING - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either SETTLED or FAILED. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.

  • FAILED - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The failureReason field contains a machine-readable error code. Content is not served.

  • SERVICE_ERROR - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.

  • SKIPPED_ORIGIN_ERROR - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.

  • DUPLICATE - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.

timestamp instance-attribute

timestamp: Timestamp

The timestamp when the settlement was recorded.

transaction_id instance-attribute

transaction_id: NotRequired[SettlementIdString]

The blockchain transaction identifier. You can use this to verify the transaction on a blockchain explorer.

verified instance-attribute

verified: VerifiedStatus

Whether the AI bot's identity was verified.

wallet_address instance-attribute

wallet_address: NotRequired[SettlementFilterString]

Your receiving wallet address.

web_acl_arn instance-attribute

web_acl_arn: NotRequired[ResourceArn]

The ARN of the web ACL that processed the request.