Payment intents
POST/v1/payment-intents

Create payment intent

View as .md
curl -X POST "https://api.52-28-238-205.sslip.io/v1/payment-intents" \  -H "Authorization: Bearer agk_test_..." \  -H "Idempotency-Key: $(uuidgen)" \  -H "Content-Type: application/json" \  -d '{"service_id":"svc_01jd2x3k4m5n6p7q8r9s0t1v2w","task_id":"weekly-report-42","idempotency_key":"weekly-report-42-forecast","purpose":"Forecast for the weekly report"}'

An agent asks to buy a catalog service or a paid URL; Abazi quotes, runs the policy, reserves budget and pays, waiting up to wait_seconds for the result. Agent credential only; requires an Idempotency-Key (header or body).

Server URLhttps://api.52-28-238-205.sslip.io
POST/v1/payment-intentsBase URL: https://api.52-28-238-205.sslip.io
Authorization
  • agentKeyAuthorization: Bearer agk_test_...
Headers
  • Idempotency-Keystring

    Required (header, or idempotency_key in the body). A retry with the same key returns the first result instead of paying twice.

Body

application/json · required. Fields are listed under Request body below.

Runs the same action from an agent, under the same policy.
IdempotentIdempotency-Key
Send a unique key per request. The same key with the same body returns the first result instead of acting twice; the same key with a different body is refused with 409 IDEMPOTENCY_CONFLICT. How keys work
Policy decisionALLOW · REQUIRE_APPROVAL · DENY
The policy engine decides this call. The result carries the decision and a reason code; see reason codes.

Authorization

agentKey
headerAuthorizationBearer <agk_test_...>

Agent credential

Header Parameters

Idempotency-Key?|

Required (header, or idempotency_key in the body). A retry with the same key returns the first result instead of paying twice.

Request Body

application/json
  1. body
service_id?|

Catalog service id (svc_...).

url?|

URL of a paid resource. Use it for a merchant that is not in the Catalog; Abazi reads its 402 response.

method?string|null
input?|

Input passed to the merchant's resource, as a JSON object.

task_id?|

The agent's own task reference, stored with the intent for tracing.

purpose?|

The agent's stated purpose (up to 500 characters). Shown to approvers and screened by Shield; not in the public receipt.

rail_hint?|

Preferred rail when the service accepts more than one (x402, wdk or card). Abazi still applies the mandate.

wait_seconds?Wait Seconds

How long the call waits for the payment result before returning the current state.

Default20
idempotency_key?|

Unique key per purchase; a retry with the same key returns the first result instead of paying twice.

Response Body

Success.

application/json
  1. response
status*Status

Current state; the allowed values and moves are in the state machines reference.

intent_id?|

Payment intent id (pi_...).

payment_status?|

Payment state of the intent; the allowed values and moves are in the state machines reference.

fulfillment_status?|

Whether the paid resource was delivered.

decision?|

Policy decision: ALLOW, REQUIRE_APPROVAL or DENY.

reason_code?|

Machine-readable reason from the reason code catalog, for example ABOVE_AUTO_THRESHOLD.

receipt_id?|

Receipt id (rcpt_...).

amount_base_units?|

Amount in integer base units, carried as a string (USDC and USDT have 6 decimals: "50000" = 0.05).

asset?|

Asset symbol, for example USDC or USDT; USD for card amounts.

network?|

Network as a CAIP-2 id, for example eip155:84532 (Base Sepolia) or solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (Solana devnet).

rail?|

Payment rail: x402 (stablecoin over HTTP 402), wdk (direct USDT transfer) or card.

merchant?|null
resource?|null
approval_expires_at?string|null
poll_after_ms?integer|null
message?string|null
[key: string]?any