OpenPermit Docs
ReferenceApi

Place an OpenPermit-compatible storefront order

POST
/api/v1/agent/commerce/place-order

Authorization

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

storefrontUrl*string
mandateId*string
items*array<>
idempotencyKey*string
metadata?
paymentCredential?string

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/place-order" \  -H "Content-Type: application/json" \  -d '{    "storefrontUrl": "http://example.com",    "mandateId": "string",    "items": [      {}    ],    "idempotencyKey": "string"  }'
{  "setupUrl": "http://example.com",  "nextAction": {    "type": "openBrowser",    "url": "http://example.com",    "label": "string"  },  "scope": {    "paymentMode": "openpermit7702",    "payTo": "string",    "tokenAddress": "string",    "tokenDecimals": 0,    "tokenName": "string",    "tokenVersion": "string",    "facilitatorAddresses": [      "string"    ]  },  "status": "paymentCredentialRequired",  "storefront": {    "name": "string",    "seller": {      "sellerId": "string",      "name": "string",      "domain": "string",      "verified": false,      "minimumAssuranceLevel": "softwareApproved"    },    "sellerId": "string",    "resourceId": "string",    "catalogUrl": "http://example.com",    "quoteUrl": "http://example.com",    "checkoutUrl": "http://example.com",    "supportedPaymentChallengeTypes": [      "x402"    ],    "chain": "string",    "asset": "string",    "paymentScope": {      "paymentMode": "openpermit7702",      "payTo": "string",      "tokenAddress": "string",      "tokenDecimals": 0,      "tokenName": "string",      "tokenVersion": "string",      "facilitatorAddresses": [        "string"      ]    },    "agentInstructions": "string",    "actions": {},    "metadata": {}  },  "quote": {    "quoteId": "string",    "sellerId": "string",    "resourceId": "string",    "amount": "string",    "asset": "string",    "items": [      {        "productId": "string",        "variantId": "string",        "name": "string",        "color": "string",        "size": "string",        "quantity": 1,        "unitAmount": "string",        "totalAmount": "string",        "asset": "string",        "metadata": {}      }    ],    "expiresAt": "string",    "metadata": {}  },  "intent": {    "intentId": "string",    "enforcementPath": "offchain",    "paymentProtocol": "x402",    "paymentChallengeType": "x402",    "settlementMode": "offchainAuthorized",    "seller": {      "sellerId": "string",      "name": "string",      "domain": "string",      "verified": false,      "minimumAssuranceLevel": "softwareApproved"    },    "resource": {      "resourceId": "string",      "sellerId": "string",      "method": "GET",      "pathTemplate": "string",      "description": "string",      "pricing": {        "type": "fixed",        "amount": "string",        "asset": "string"      },      "configurationSource": "dashboard",      "acceptedPaymentChallengeTypes": [        "x402"      ],      "minimumAssuranceLevel": "softwareApproved",      "paymentConfig": {}    },    "amount": "string",    "asset": "string",    "chain": "string",    "payTo": "string",    "feeQuote": {      "feeQuoteId": "string",      "feeScheduleId": "string",      "buyerOrganizationId": "string",      "sellerOrganizationId": "string",      "settlementMode": "offchainAuthorized",      "enforcementPath": "offchain",      "paymentProtocol": "x402",      "paymentChallengeType": "x402",      "chain": "string",      "asset": "string",      "grossAmount": "string",      "sellerNetAmount": "string",      "openPermitFeeAmount": "string",      "providerFeeAmount": "0",      "networkFeeAmount": "0",      "feePayer": "buyer",      "feeRecipient": "string",      "feeScheduleHash": "string",      "expiresAt": "string",      "createdAt": "string",      "metadata": {}    },    "challenge": {},    "credentialRequirements": {},    "metadata": {},    "expiresAt": "string",    "nonce": "string",    "idempotencyKey": "string",    "createdAt": "string"  },  "authorization": {    "authorizationId": "string",    "policyDecision": {      "policyDecisionId": "string",      "mandateId": "string",      "intentId": "string",      "outcome": "allow",      "reasons": [],      "denialCode": "string",      "reservationId": "string",      "createdAt": "string"    },    "expiresAt": "string"  },  "paymentRequired": {    "property1": "string",    "property2": "string"  },  "agentInstructions": "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  },  "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  }}