Register or re-register an endpoint this merchant hosts, so Mayarin can quote it and settle for it. The url must be the exact URL an agent will call — scheme, host and path all count, because a resource is identified by it. The token's EIP-712 domain and transfer method are read off the contracts at registration, never entered.
Authorization
secretKey AuthorizationBearer <token>
Server-side sk_ key. Grants a subset of the merchant's permissions.
In: header
Header Parameters
Idempotency-Key*string
Stable unique key for this logical write. Keep it unchanged when retrying.
Length
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/x402/resources" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "id": "string", "url": "http://example.com", "price": { "amount": "string", "asset": "IDR" }, "accepts": [ { "chain": "ethereum-sepolia", "asset": "IDR", "contract": "string", "payTo": "string" } ], "maxTimeoutSeconds": 1 }'{ "resource": { "id": "string", "merchantId": "string", "url": "string", "description": "string", "mimeType": "string", "price": { "amount": "string", "asset": "string", "formatted": "string", "display": "string" }, "maxTimeoutSeconds": 0, "listed": true, "accepts": [ { "chain": "string", "asset": "string", "contract": "string", "payTo": "string", "transferMethod": "string", "domain": { "property1": null, "property2": null } } ] }}