Transactions represent completed or in-progress payments through your payment links and checkout sessions. The transactions API is read-only -- transactions are created automatically when customers pay through your checkout flow.

Info

Transaction amounts are stored in the token's smallest unit (e.g., 6 decimals for USDC). The amount_usd field provides the USD equivalent at the time of the transaction.

The Transaction object

idstring

Unique identifier for the transaction (e.g., tx_abc123).

statusstring

Current status of the transaction. One of: pending, confirming, completed, failed.

amountstring

Transaction amount in the token's smallest unit.

amount_usdstring

USD equivalent of the transaction amount at the time of payment.

Contract address of the received token.

chain_idnumber

Chain ID where the payment was received.

tx_hashstring | null

On-chain transaction hash. Null while pending.

Wallet address of the payer.

Wallet address that received the payment.

customer_idstring | null

Associated customer ID, if the payer is a known customer.

payment_link_idstring | null

Payment link that originated this transaction.

session_idstring | null

Checkout session that originated this transaction.

source_chain_idnumber | null

If the payer paid from a different chain, this is the chain they paid from.

source_token_addressstring | null

If the payer paid with a different token, this is the token they paid with.

source_amountstring | null

The amount the payer sent (before swap/bridge), in the source token's smallest unit.

fee_amountstring | null

Platform fee amount in the received token's smallest unit.

form_dataobject | null

Custom form data submitted by the customer during checkout.

shipping_addressobject | null

Shipping address provided by the customer.

shipping_optionobject | null

Selected shipping option.

metadataobject | null

Metadata from the checkout session.

created_atstring

ISO 8601 timestamp when the transaction was initiated.

confirmed_atstring | null

ISO 8601 timestamp when the transaction reached confirming status.

completed_atstring | null

ISO 8601 timestamp when the transaction reached completed status.

Transaction statuses

StatusDescription
pendingTransaction initiated, waiting for on-chain submission.
confirmingTransaction submitted on-chain, waiting for block confirmations.
completedTransaction confirmed and payment received by the recipient.
failedTransaction failed due to revert, timeout, or insufficient funds.

List transactions

Retrieve a paginated list of transactions with optional filters.

statusstringquery

Filter by status: pending, confirming, completed, failed.

customer_idstringquery

Filter by customer ID.

payment_link_idstringquery

Filter by payment link ID.

fromstringquery

Filter transactions created on or after this ISO 8601 date (e.g., 2026-01-01).

tostringquery

Filter transactions created on or before this ISO 8601 date (e.g., 2026-02-28).

pagenumberquerydefault: 1

Page number for pagination.

limitnumberquerydefault: 20

Number of results per page (max 100).

curl -X GET "https://platform-api.anyspend.com/api/v1/transactions?status=completed&from=2026-02-01&to=2026-02-28&page=1&limit=20" \
  -H "Authorization: Bearer asp_xxx"
json
{ "data": [ { "id": "tx_abc123", "status": "completed", "amount": "50000000", "amount_usd": "50.00", "token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain_id": 1, "tx_hash": "0x9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e", "payer_address": "0xaabb1234ccdd5678eeff9900aabb1234ccdd5678", "recipient_address": "0x1234567890abcdef1234567890abcdef12345678", "customer_id": "cust_abc123", "payment_link_id": "pl_abc123", "session_id": "cs_sess001", "source_chain_id": 8453, "source_token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "source_amount": "50000000", "fee_amount": "500000", "form_data": { "company_name": "Acme Inc." }, "shipping_address": null, "shipping_option": null, "metadata": null, "created_at": "2026-02-25T08:15:00Z", "confirmed_at": "2026-02-25T08:15:45Z", "completed_at": "2026-02-25T08:16:30Z" } ], "pagination": { "page": 1, "limit": 20, "total": 156, "total_pages": 8, "has_more": true }}

Retrieve a transaction

idstringrequiredpath

The transaction ID (e.g., tx_abc123).

curl -X GET "https://platform-api.anyspend.com/api/v1/transactions/tx_abc123" \
  -H "Authorization: Bearer asp_xxx"

Returns the full Transaction object.


Get transaction stats

Retrieve aggregate statistics across all your transactions.

curl -X GET "https://platform-api.anyspend.com/api/v1/transactions/stats" \
  -H "Authorization: Bearer asp_xxx"
json
{ "total_transactions": 1250, "completed_transactions": 1180, "failed_transactions": 45, "pending_transactions": 25, "total_volume_usd": "58750.00", "last_24h": { "transactions": 18, "completed": 17, "volume_usd": "920.00" }, "status_breakdown": { "pending": 15, "confirming": 10, "completed": 1180, "failed": 45 }}

Export transactions

Export transaction data in CSV or JSON format. The response is streamed as a file download.

formatstringrequiredquery

Export format. One of: csv, json.

statusstringquery

Filter by status: pending, confirming, completed, failed.

fromstringquery

Filter transactions created on or after this ISO 8601 date.

tostringquery

Filter transactions created on or before this ISO 8601 date.

Info

Exports are limited to 50,000 records. For larger datasets, use date range filters to break exports into smaller chunks.

# Export completed transactions for February 2026 as CSV
curl -X GET "https://platform-api.anyspend.com/api/v1/transactions/export?format=csv&status=completed&from=2026-02-01&to=2026-02-28" \
  -H "Authorization: Bearer asp_xxx" \
  -o transactions.csv

# Export as JSON
curl -X GET "https://platform-api.anyspend.com/api/v1/transactions/export?format=json&status=completed" \
  -H "Authorization: Bearer asp_xxx" \
  -o transactions.json
csv
id,status,amount,amount_usd,token_address,chain_id,tx_hash,payer_address,recipient_address,customer_id,payment_link_id,created_at,completed_attx_abc123,completed,50000000,50.00,0xA0b8...eB48,1,0x9f8e...1f0e,0xaabb...5678,0x1234...5678,cust_abc123,pl_abc123,2026-02-25T08:15:00Z,2026-02-25T08:16:30Ztx_def456,completed,25000000,25.00,0xA0b8...eB48,1,0x1a2b...3c4d,0xccdd...9012,0x1234...5678,cust_def456,pl_abc123,2026-02-24T12:00:00Z,2026-02-24T12:01:15Z
Ask a question... ⌘I