Skip to content

Run a mock charge through the shared authorization service

POST
/v1/test/agent_cards/{id}/authorizations
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" }'
id
required
string
idempotency-key
required

Required retry-safe key; reuse it only for the same operation and request body

string
>= 1 characters <= 255 characters

Required retry-safe key; reuse it only for the same operation and request body

Media typeapplication/json
object
amount
required
integer
>= 1 <= 100000000
currency
string
default: USD >= 3 characters <= 3 characters
network_merchant_id
required
string
>= 1 characters <= 100 characters
merchant_name
string
<= 100 characters
mcc
required
string
/^\d{4}$/

Authorization decision; a decline has approved=false

Media typeapplication/json
object
object
required
string
Allowed values: agent_card_authorization
id
required
string
card_id
required
string
wallet_id
required
string
authorization_id
required
string
amount
required
integer
>= 1 <= 100000000
currency
required
string
approved
required
boolean
reason
required
string
Allowed values: approved card_inactive wallet_inactive merchant_unavailable currency_unsupported merchant_mismatch mcc_not_allowed card_limit_exceeded intent_required daily_cap_exceeded insufficient_funds processing_error timeout
intent_id
required
string | null
merchant_name
required

Sanitized issuer merchant name; display only

string | null
<= 100 characters
intent_merchant_name
required

Declared merchant name of the consumed intent; display only

string | null
<= 100 characters
settlement
required
string | null
Allowed values: held captured released
created_at
required
string
Example
{
"object": "agent_card_authorization",
"reason": "approved",
"settlement": "held"
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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.

Retry-After
string

Minimum seconds to wait before retrying. Takes precedence over the quota snapshot.

Service unavailable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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.