PricingDocument
The pricing document. Its complete JSON Schema is https://co-relayer.com/schemas/pricing-v1.json.
This schema types the top-level keys and the tier record, and leaves the rest to that schema.
Unix time in milliseconds.
Possible values: >= 0
network objectrequired
Each network publishes its own pricing document. Compare network.chainId with the chainID of every transaction you sign.
Each network publishes its own pricing document. Compare network.chainId with the chainID of every transaction you sign.
- Example 1
- Example 2
{"caip2":"mvx:1","x402Network":"multiversx:1","chainId":"1","roundDurationMs":600}{"caip2":"mvx:D","x402Network":"multiversx:D","chainId":"D","roundDurationMs":600}source objectrequired
source.views lists the contract views the document is generated from: getConfig, getPricingConfig, getTiers, getTariff, getRuSchedule, getRateClasses, getSwapBudget.
source.views lists the contract views the document is generated from: getConfig, getPricingConfig, getTiers, getTariff, getRuSchedule, getRateClasses, getSwapBudget.
paymentToken objectrequired
Read from the contract's getConfig(): USDC-c76f1f on mainnet, USDC-350c4e on devnet.
Read from the contract's getConfig(): USDC-c76f1f on mainnet, USDC-350c4e on devnet.
falsetariff objectrequired
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Unix time in milliseconds.
Possible values: >= 0
rules objectrequired
formulas objectrequired
relayUnit objectrequired
admission objectrequired
deposit objectrequired
lifecycle objectrequired
payg objectrequired
rateClasses objectrequired
classes object[]required
Possible values: >= 1
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Per-transaction RU ceiling of the class, including the data term: 15 for classes 1 and 6, 25 for classes 2-5. admission.maxRuPerTx is the largest value of any class (admission.maxRuPerTxNote).
Possible values: Value must match regular expression ^[0-9]+$
tiers object[]required
Possible values: [human, agent]
Possible values: [draft, active, legacy, retired]
False while a listed tier cannot be bought. On mainnet, tiers 4, 5 and 13 stay draft until the relayer float for their rate class is funded; all eight tiers are active on devnet.
Present only when available is false.
Possible values: [CAPACITY]
Possible values: >= 0
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Non-negative integer as decimal string (pricing document family).
Possible values: Value must match regular expression ^[0-9]+$
Possible values: [agent, payg_allowed, priority_lane, dedicated_pool, sponsor_any_sender, custom]
Possible values: [best-effort, standard, priority, dedicated]
howToBuy objectrequired
How to buy a plan. howToBuy.freeOperations lists the contract calls that are relayed free of charge. howToBuy.onChain.gasLimit and gasLimitFlags are measured on each network, so the values differ between devnet and mainnet.
How to buy a plan. howToBuy.freeOperations lists the contract calls that are relayed free of charge. howToBuy.onChain.gasLimit and gasLimitFlags are measured on each network, so the values differ between devnet and mainnet.
links objectrequired
{
"schema": "string",
"documentVersion": 0,
"updatedAtMs": 0,
"network": {
"caip2": "mvx:1",
"x402Network": "multiversx:1",
"chainId": "1",
"roundDurationMs": 600
},
"source": {},
"paymentToken": {},
"refundable": true,
"tariff": {
"unit": "string",
"effective": "string",
"version": 0,
"effectiveSinceMs": 0,
"pending": "string",
"pendingEffectiveMs": 0,
"rules": {},
"formulas": {}
},
"relayUnit": {},
"admission": {},
"deposit": {},
"lifecycle": {},
"payg": {},
"rateClasses": {
"policyVersion": 0,
"classes": [
{
"rateClass": 1,
"ruPerSecSustained": 1,
"ruPerSecBurst": 15,
"gasLimitPerSecPerShard": "20000000",
"gasBurst": "200000000",
"maxGasLimit": "100000000",
"maxRuPerTx": "15",
"ruPerHour": 300
}
]
},
"tiers": [
{
"tierId": 0,
"slug": "string",
"name": "string",
"audience": "human",
"status": "draft",
"available": true,
"unavailableReason": "CAPACITY",
"periodMs": 0,
"capRu": "string",
"priceUnits": "string",
"paygBps": 0,
"price": "string",
"paygPricePerRu": "string",
"pendingPrice": "string",
"pendingPaygPricePerRu": "string",
"maxSenders": 0,
"flags": [
"agent"
],
"rateClass": 0,
"slaClass": "best-effort",
"successorTierId": 0,
"singlePaymentPurchasable": true,
"note": "string"
}
],
"howToBuy": {},
"links": {}
}