Run a mock charge through the shared authorization service
const url = 'https://api.xaalis.org/v1/test/agent_cards/example/authorizations';const options = { method: 'POST', headers: { 'idempotency-key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"amount":1,"currency":"USD","network_merchant_id":"example","merchant_name":"example","mcc":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.xaalis.org/v1/test/agent_cards/example/authorizations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --data '{ "amount": 1, "currency": "USD", "network_merchant_id": "example", "merchant_name": "example", "mcc": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Required retry-safe key; reuse it only for the same operation and request body
Required retry-safe key; reuse it only for the same operation and request body
Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “ Responses ”Authorization decision; a decline has approved=false
object
Sanitized issuer merchant name; display only
Declared merchant name of the consumed intent; display only
Example
{ "object": "agent_card_authorization", "reason": "approved", "settlement": "held"}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Validation error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Authentication required
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Forbidden
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Not found
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Idempotency conflict or invalid state
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Policy limit or insufficient funds
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Rate limited
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Minimum seconds to wait before retrying. Takes precedence over the quota snapshot.
Service unavailable
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.