Skip to content

Get eligible mandates

Find mandates that can cover a specific payment. Use before calling the X402 V3 payment endpoint to pick the right mandateId.

GET
/api/mandates/eligible

Authorizations

agentJwt

Agent registration JWT. Send as Authorization: Bearer <agent-jwt>.

Type
HTTP (bearer)

Responses

Matching criteria and the list of eligible mandates. An empty list means no mandate covers this payment.

application/json

Result of an eligibility query.

Valid values"ok"

The criteria the query was evaluated against.

Mandates that can cover the requested payment. Empty if none qualify.

{
  "status": "<string>",
  "criteria": {
    "host": "<string>",
    "amount": "<string>",
    "currency": "<string>"
  },
  "eligibleMandates": [
    {
      "mandateId": "<string>",
      "status": "<string>",
      "isEnabled": "<boolean>",
      "naturalLanguage": "<string>",
      "category": "<string>",
      "currency": "<string>",
      "limitAmount": "<string>",
      "spentAmount": "<string>",
      "pendingSpentAmount": "<string>",
      "remainingAmount": "<string>",
      "validFrom": "<string>",
      "validUntil": "<string>",
      "hostAllowlist": [
        "<string>"
      ],
      "mandateHash": "<string>",
      "signedAt": "<string>",
      "createdAt": "<string>",
      "detailsUrl": "<string>",
      "signUrl": "<string>"
    }
  ]
}

Released under the MIT License.