OpenPermit Docs
ReferenceApi

Check whether a buyer mandate is ready for autonomous agent commerce

POST
/api/v1/agent/commerce/readiness

Authorization

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

mandateId*string
storefrontUrl*string
sellerId?string
resourceId?string
paymentChallenge?string
paymentMode?string
chain?string
asset?string
amount?string
payTo?string
tokenAddress?string
tokenDecimals?integer
tokenName?string
tokenVersion?string
items?array<>
idempotencyKey?string
metadata?
expiresInSeconds?integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/agent/commerce/readiness" \  -H "Content-Type: application/json" \  -d '{    "mandateId": "string",    "storefrontUrl": "http://example.com"  }'
{  "status": "ready",  "mandateId": "string",  "scope": {    "mandateId": "string",    "storefrontUrl": "http://example.com",    "sellerId": "string",    "resourceId": "string",    "paymentChallenge": "x402",    "paymentMode": "openpermit7702",    "chain": "string",    "asset": "string",    "amount": "string",    "payTo": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "tokenName": "string",    "tokenVersion": "string",    "items": [      {        "productId": "string",        "variantId": "string",        "query": "string",        "color": "string",        "size": "string",        "quantity": 1,        "metadata": {}      }    ],    "idempotencyKey": "string",    "metadata": {}  },  "checks": [    {      "key": "string",      "status": "ready",      "message": "string",      "problem": {        "type": "about:blank",        "title": "string",        "status": 0,        "detail": "string",        "instance": "string",        "requestId": "string",        "code": "string",        "category": "buyer_action_required",        "actor": "buyer",        "retryable": true,        "payment": {          "chain": "string",          "asset": "string",          "tokenAddress": "string",          "tokenDecimals": 0,          "amount": "string",          "amountAtomic": "string",          "requiredAmount": "string",          "requiredAmountAtomic": "string",          "balance": "string",          "balanceAtomic": "string",          "payer": "string",          "payTo": "string"        },        "nextActions": [          {            "type": "fund_wallet",            "label": "string",            "description": "string",            "href": "http://example.com",            "address": "string",            "chain": "string",            "asset": "string",            "amount": "string",            "metadata": {              "property1": null,              "property2": null            }          }        ],        "debug": {          "property1": null,          "property2": null        }      },      "nextActions": [        {          "type": "fund_wallet",          "label": "string",          "description": "string",          "href": "http://example.com",          "address": "string",          "chain": "string",          "asset": "string",          "amount": "string",          "metadata": {            "property1": null,            "property2": null          }        }      ]    }  ],  "requiredActions": []}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  },  "errors": [    {      "detail": "string",      "pointer": "string"    }  ]}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  }}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  }}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  }}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  }}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "category": "buyer_action_required",  "actor": "buyer",  "retryable": true,  "payment": {    "chain": "string",    "asset": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "amount": "string",    "amountAtomic": "string",    "requiredAmount": "string",    "requiredAmountAtomic": "string",    "balance": "string",    "balanceAtomic": "string",    "payer": "string",    "payTo": "string"  },  "nextActions": [    {      "type": "fund_wallet",      "label": "string",      "description": "string",      "href": "http://example.com",      "address": "string",      "chain": "string",      "asset": "string",      "amount": "string",      "metadata": {        "property1": null,        "property2": null      }    }  ],  "debug": {    "property1": null,    "property2": null  }}