View a markdown version of this page

SettlementRecord - AWS WAFV2

SettlementRecord

A single settlement transaction record for AI bot monetization. Contains details about the payment including timestamp, amount, status, and the parties involved.

Contents

Amount

The payment amount in the specified currency.

Type: String

Required: Yes

Status

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.

Type: String

Valid Values: SETTLED | PENDING | FAILED | SERVICE_ERROR | SKIPPED_ORIGIN_ERROR | DUPLICATE

Required: Yes

Timestamp

The timestamp when the settlement was recorded.

Type: Timestamp

Required: Yes

ContentPath

The content path that was accessed.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*\S.*

Required: No

Currency

The currency of the payment amount.

Type: String

Valid Values: USDC

Required: No

Intent

The declared intent of the AI bot request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*\S.*

Required: No

Network

The blockchain network on which the settlement occurred.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9:._\-=+/]+$

Required: No

Organization

The organization associated with the AI bot.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*\S.*

Required: No

PayerAddress

The blockchain wallet address of the paying AI agent.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9:._\-=+/]+$

Required: No

RequestId

The AWS WAF request ID associated with this settlement.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9:._\-=+/]+$

Required: No

RequestTimestamp

The timestamp of the original web request.

Type: Timestamp

Required: No

SourceCategory

The category of the AI bot source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*\S.*

Required: No

SourceName

The name of the AI bot that made the payment.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*\S.*

Required: No

TransactionId

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

Verified

Whether the AI bot's identity was verified.

Type: Boolean

Required: No

WalletAddress

Your receiving wallet address.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9:._\-=+/]+$

Required: No

WebAclArn

The ARN of the web ACL that processed the request.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: .*\S.*

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: