x402 API

Get supported payment schemes and networks#

Get the supported x402 protocol payment schemes and networks that the facilitator is able to verify and settle payments for.

Request address#

GET https://web3.okx.com/api/v6/x402/supported/

Request parameters#

No

Response parameter#

ParameterTypeDescription
x402VersionStringThe version of the x402 protocol (e.g., 1)
schemeStringSettlement scheme, e.g., exact (one‑time fixed‑amount payment)
chainIndexStringUnique chain identifier, e.g., 196 (X Layer)
chainNameStringChain name, e.g., X Layer

Request example#

curl --location --request GET 'https://web3.okx.com/api/v6/x402/supported' \

--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response example#

200
{
    "code": "0",
    "data": [
        {
               "x402Version": 1,
               "scheme": "exact",
               "chainIndex": "196",
               "chainName": "X Layer"
        }
    ],
    "msg": ""
}