OpenPermit Docs
ReferenceApi

Authorize payment against mandate policy

POST
/api/v1/payments/authorize

Authorization

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

mandateId*string
intent*

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/payments/authorize" \  -H "Content-Type: application/json" \  -d '{    "mandateId": "string",    "intent": {      "intentId": "string",      "paymentPath": "offchain",      "paymentMethod": "x402",      "seller": {        "sellerId": "string",        "name": "string",        "domain": "string"      },      "resource": {        "resourceId": "string",        "sellerId": "string",        "method": "GET",        "pathTemplate": "string",        "pricing": {          "type": "fixed",          "amount": "string",          "asset": "string"        },        "acceptedPaymentMethods": [          "x402"        ]      },      "amount": "string",      "asset": "string",      "expiresAt": "string",      "nonce": "string",      "idempotencyKey": "string",      "createdAt": "string"    }  }'
{  "authorizationId": "string",  "policyDecision": {    "policyDecisionId": "string",    "mandateId": "string",    "intentId": "string",    "outcome": "allow",    "reasons": [],    "denialCode": "string",    "reservationId": "string",    "createdAt": "string"  },  "expiresAt": "string"}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string",  "errors": [    {      "detail": "string",      "pointer": "string"    }  ]}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string"}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string"}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string"}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string"}
{  "type": "about:blank",  "title": "string",  "status": 0,  "detail": "string",  "instance": "string",  "requestId": "string",  "code": "string"}