Skip to content

/AWS1/CL_BDCCRYPTOX402PMNTINP

The input for a crypto X402 payment.

CONSTRUCTOR

IMPORTING

Required arguments:

iv_version TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The version of the X402 protocol.

io_payload TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT

The X402 payment payload.

Optional arguments:

iv_permit2allowancelimit TYPE /AWS1/BDCPERMIT2ALLOWANCELIMIT /AWS1/BDCPERMIT2ALLOWANCELIMIT

The maximum on-chain Permit2 allowance to grant before signing the payment authorization, in the asset's smallest denomination. This field is valid only for the upto (metered) scheme; supplying it for the exact scheme returns a validation error.

When set, the service approves an ERC-20 allowance for this amount before processing the payment. The approval sets, rather than adds to, the wallet's allowance. Set this field only when the wallet needs approving, for example on its first upto payment, to avoid a redundant on-chain transaction. Omit the field to skip allowance handling. This is the default, and the only behavior for the exact scheme.


Queryable Attributes

version

The version of the X402 protocol.

Accessible with the following methods

Method Description
GET_VERSION() Getter for VERSION, with configurable default
ASK_VERSION() Getter for VERSION w/ exceptions if field has no value
HAS_VERSION() Determine if VERSION has a value

payload

The X402 payment payload.

Accessible with the following methods

Method Description
GET_PAYLOAD() Getter for PAYLOAD, with configurable default
ASK_PAYLOAD() Getter for PAYLOAD w/ exceptions if field has no value
HAS_PAYLOAD() Determine if PAYLOAD has a value

permit2AllowanceLimit

The maximum on-chain Permit2 allowance to grant before signing the payment authorization, in the asset's smallest denomination. This field is valid only for the upto (metered) scheme; supplying it for the exact scheme returns a validation error.

When set, the service approves an ERC-20 allowance for this amount before processing the payment. The approval sets, rather than adds to, the wallet's allowance. Set this field only when the wallet needs approving, for example on its first upto payment, to avoid a redundant on-chain transaction. Omit the field to skip allowance handling. This is the default, and the only behavior for the exact scheme.

Accessible with the following methods

Method Description
GET_PERMIT2ALLOWANCELIMIT() Getter for PERMIT2ALLOWANCELIMIT, with configurable default
ASK_PERMIT2ALLOWANCELIMIT() Getter for PERMIT2ALLOWANCELIMIT w/ exceptions if field has
HAS_PERMIT2ALLOWANCELIMIT() Determine if PERMIT2ALLOWANCELIMIT has a value