English

Merchant Self-Serve x402 Integration

This guide is for merchants who want to self-onboard into the Axon x402 facilitator and publish their own payment routes without manual platform edits.

Live environment

1. Onboard the merchant

  1. Call POST /v1/merchant/onboard/challenge with merchantPayTo.
  2. Sign the returned challenge text with the same wallet.
  3. Call POST /v1/merchant/onboard/complete to receive a one-time merchant_admin API key.

2. Create a runtime key

Use the admin key with:

Merchant backend calls to /v2/x402/verify and /v2/x402/settle should use a payment_runtime key.

3. Create a resource and routes

Use the admin key with:

Platform rules:

4. Integrate your backend

  1. Read your own resource routes from discovery.
  2. Return 402 payment_required with the selected accept route.
  3. When a buyer submits payment, call /v2/x402/verify.
  4. If verification succeeds, call /v2/x402/settle.
  5. Return the merchant business response after settlement succeeds.

5. Axon compatibility patch

6. Errors and retries