Endpoints
Detailed reference for each Prism Gateway API endpoint. All endpoints use the base URLhttps://prism-gw.fd.xyz and require an API key in the X-API-Key header. See Introduction for authentication and error handling details.
Create Charge
Create a new payment charge. Returns the charge details including payment requirements that an AI agent uses to submit payment.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount in USD (e.g., "0.50") |
token | string | Yes | Token symbol (FDUSD or USDC) |
chain | string | Yes | Chain identifier (base, ethereum, bsc, arbitrum) |
description | string | No | Human-readable description |
metadata | object | No | Arbitrary key-value metadata |
Response
Get Charge
Retrieve details of a specific charge, including its current status and payment information.Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Charge ID (ch_...) |
Response
Charge Statuses
| Status | Description |
|---|---|
pending | Charge created, awaiting payment |
completed | Payment verified and settled on-chain |
failed | Payment failed verification |
expired | Charge expired before payment was received |
cancelled | Charge manually cancelled |
Cancel Charge
Cancel a pending charge. Only works for charges withpending status — charges that have already been paid cannot be cancelled.
Response
400 if the charge is not in pending status.
Register Webhook
Register a new webhook endpoint to receive payment event notifications. See Webhooks for implementation details and signature verification.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS URL to receive webhook POSTs |
events | array | Yes | Event types to subscribe to |
Response
List Transactions
Retrieve a paginated list of transactions with optional filtering.Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Max results per page (max: 100) |
offset | number | 0 | Pagination offset |
status | string | — | Filter by status (completed, failed, etc.) |
chain | string | — | Filter by chain (base, ethereum, etc.) |
from | string | — | Start date, ISO 8601 |
to | string | — | End date, ISO 8601 |