Interface SettlementRecord.Builder

  • Method Details

    • timestamp

      SettlementRecord.Builder timestamp(Instant timestamp)

      The timestamp when the settlement was recorded.

      Parameters:
      timestamp - The timestamp when the settlement was recorded.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • payerAddress

      SettlementRecord.Builder payerAddress(String payerAddress)

      The blockchain wallet address of the paying AI agent.

      Parameters:
      payerAddress - The blockchain wallet address of the paying AI agent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • walletAddress

      SettlementRecord.Builder walletAddress(String walletAddress)

      Your receiving wallet address.

      Parameters:
      walletAddress - Your receiving wallet address.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • amount

      The payment amount in the specified currency.

      Parameters:
      amount - The payment amount in the specified currency.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • currency

      SettlementRecord.Builder currency(String currency)

      The currency of the payment amount.

      Parameters:
      currency - The currency of the payment amount.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • currency

      SettlementRecord.Builder currency(Currency currency)

      The currency of the payment amount.

      Parameters:
      currency - The currency of the payment amount.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • network

      SettlementRecord.Builder network(String network)

      The blockchain network on which the settlement occurred.

      Parameters:
      network - The blockchain network on which the settlement occurred.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • transactionId

      SettlementRecord.Builder transactionId(String transactionId)

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

      Parameters:
      transactionId - The blockchain transaction identifier. You can use this to verify the transaction on a blockchain explorer.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requestId

      SettlementRecord.Builder requestId(String requestId)

      The WAF request ID associated with this settlement.

      Parameters:
      requestId - The WAF request ID associated with this settlement.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceName

      SettlementRecord.Builder sourceName(String sourceName)

      The name of the AI bot that made the payment.

      Parameters:
      sourceName - The name of the AI bot that made the payment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • organization

      SettlementRecord.Builder organization(String organization)

      The organization associated with the AI bot.

      Parameters:
      organization - The organization associated with the AI bot.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceCategory

      SettlementRecord.Builder sourceCategory(String sourceCategory)

      The category of the AI bot source.

      Parameters:
      sourceCategory - The category of the AI bot source.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • intent

      The declared intent of the AI bot request.

      Parameters:
      intent - The declared intent of the AI bot request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • verified

      SettlementRecord.Builder verified(Boolean verified)

      Whether the AI bot's identity was verified.

      Parameters:
      verified - Whether the AI bot's identity was verified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentPath

      SettlementRecord.Builder contentPath(String contentPath)

      The content path that was accessed.

      Parameters:
      contentPath - The content path that was accessed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • webAclArn

      SettlementRecord.Builder webAclArn(String webAclArn)

      The ARN of the web ACL that processed the request.

      Parameters:
      webAclArn - The ARN of the web ACL that processed the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requestTimestamp

      SettlementRecord.Builder requestTimestamp(Instant requestTimestamp)

      The timestamp of the original web request.

      Parameters:
      requestTimestamp - The timestamp of the original web request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.