v2

latestOpenAPI 3.1.0Proprietary2026-07-26127193620.1 KB
Payments

Create an email-native payment challenge

Issue an x402 payment challenge over a real email thread (the payee side). Unlike createChallenge (which mints a synthetic challenge id), this sends the challenge as an email from from to to and binds the payment to that DKIM-authenticated thread. The pay_to address and the token asset are resolved server-side from your registered default payout address for the network, never from the request. The response carries the thread's interaction_id plus the challenge (the payment_requirements, the nonce_binding, and expires_at) the payer needs to sign; the payer replies with a signed payment interaction step. Amounts are in token base units (USDC has 6 decimals, so "10000" is 0.01 USDC).

post/x402/email-challenges

Headers

Idempotency-Keystring

Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.

Request body

fromstring email required

Your sending address (the payee / funds receiver). Must be an address your org is allowed to send from.

tostring email required

The payer's email address the challenge is sent to.

amountstring required

Amount to collect, in token base units (unlike the charge CLI command, which also accepts --amount-usdc, this field takes base units only). USDC has 6 decimals, so "10000" is 0.01 USDC: multiply a human USDC amount by 1,000,000 (0.01 USDC -> "10000").

network'base' | 'base-sepolia' required
expires_ininteger

Seconds until the challenge expires. Defaults to 300.

resourcestring uri

Optional URL identifying what is being paid for.

descriptionstring

Optional human-readable description of the payment.

Response

Idempotent replay: a request with a previously-used idempotency key returns the original issued challenge without sending a second email.

successtrue required

Example response

{
  "data": {
    "challenge": {
      "payment_requirements": {
        "scheme": "exact"
      }
    }
  }
}