Skip to main content

Fake Transaction Data API

MOCK DATA

Fake account transactions with realistic merchants, weighted statuses and currency-correct amounts — filter by type, status, amount range and date window.

Generated test data for fixtures and development

Base URL
/api/transactions
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/transactions

Live requestRuns against the public API
No key required
GET/api/transactions?seed=42

Request parameters

Smallest possible amount, inclusive.

Largest possible amount, inclusive. Must be ≥ minAmount.

ISO 4217 currency code (3 letters, case-insensitive). Amounts are rounded to the currency's minor unit — JPY/KRW give whole numbers, KWD three decimals. Unknown codes are a 400. Supported: USD, EUR, GBP, JPY, CNY, CHF, CAD, AUD, NZD, SEK, NOK, DKK, PLN, CZK, SGD, HKD, KRW, INR, BRL, MXN, ZAR, TRY, KWD.

Only generate this transaction type. Omit for a realistic weighted mix (payments most common).

Only generate this status. Omit for the weighted mix: 80% completed, 12% pending, 8% failed.

Earliest possible timestamp, inclusive (YYYY-MM-DD or ISO 8601). Defaults to 90 days before 'to'.

Latest possible timestamp, inclusive — date-only values mean midnight UTC. Defaults to the request time. Must be ≥ 'from'.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/transactions?seed=42"
const res = await fetch("https://randomapi.dev/api/transactions?seed=42");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/transactions?seed=42").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/transactions?seed=42"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 7
minAmount float

Smallest possible amount, inclusive.

default: 0.01
allowed: 0 – 10000000
example: minAmount=10
maxAmount float

Largest possible amount, inclusive. Must be ≥ minAmount.

default: 5000
allowed: 0 – 10000000
example: maxAmount=250.75
currency string

ISO 4217 currency code (3 letters, case-insensitive). Amounts are rounded to the currency's minor unit — JPY/KRW give whole numbers, KWD three decimals. Unknown codes are a 400. Supported: USD, EUR, GBP, JPY, CNY, CHF, CAD, AUD, NZD, SEK, NOK, DKK, PLN, CZK, SGD, HKD, KRW, INR, BRL, MXN, ZAR, TRY, KWD.

default: USD
allowed: 3 – 3
example: currency=EUR
type enum

Only generate this transaction type. Omit for a realistic weighted mix (payments most common).

allowed: payment | refund | transfer | deposit | withdrawal
example: type=payment
status enum

Only generate this status. Omit for the weighted mix: 80% completed, 12% pending, 8% failed.

allowed: completed | pending | failed
example: status=completed
from date

Earliest possible timestamp, inclusive (YYYY-MM-DD or ISO 8601). Defaults to 90 days before 'to'.

example: from=2026-01-01
to date

Latest possible timestamp, inclusive — date-only values mean midnight UTC. Defaults to the request time. Must be ≥ 'from'.

example: to=2026-03-31
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=id,amount
exclude list

Return all fields except these (comma-separated).

example: exclude=reference
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 9
id string

Processor-style transaction id: 'txn_' + 24 lowercase hex characters.

example: txn_9f2c4b7a1e8d3f6a5c0b2e4d

amount float

Amount within minAmount..maxAmount, rounded to the currency's minor unit (whole numbers for JPY/KRW).

example: 129.99

currency string

ISO 4217 code the amount is denominated in.

example: USD

type string

payment | refund | transfer | deposit | withdrawal.

example: payment

status string

completed | pending | failed — weighted 80/12/8 when not filtered.

example: completed

description string

Human-readable line, always coherent with the type and naming the merchant.

example: Payment to Lumen Coffee Roasters

merchant string

Counterparty drawn from a pool matching the type (store, account, payer or ATM).

example: Lumen Coffee Roasters

timestamp string (ISO 8601)

When the transaction happened — always within the from..to window.

example: 2026-05-14T09:23:41.512Z

reference string

Bank-statement reference: 'REF-' + 6 uppercase alphanumerics.

example: REF-7K2M9Q

Documented examples

Build-generated requests and complete responses
4
Ten transactions from the past 90 days
GET /api/transactions?seed=42
{
  "data": [
    {
      "id": "txn_016cfb6a5c85eac58cdd40fb",
      "amount": 509.1,
      "currency": "USD",
      "type": "refund",
      "status": "completed",
      "description": "Refund from Cloudline Airways",
      "merchant": "Cloudline Airways",
      "timestamp": "2026-06-17T15:01:45.359Z",
      "reference": "REF-DNSNH1"
    },
    {
      "id": "txn_248abeccba6fd45df91c3667",
      "amount": 1389.43,
      "currency": "USD",
      "type": "payment",
      "status": "completed",
      "description": "Payment to PixelWare Games",
      "merchant": "PixelWare Games",
      "timestamp": "2026-07-29T00:32:42.904Z",
      "reference": "REF-H7T93X"
    },
    {
      "id": "txn_0902c05ac838fecf0b9c4166",
      "amount": 1088.2,
      "currency": "USD",
      "type": "deposit",
      "status": "completed",
      "description": "Deposit from Halcyon Design Studio",
      "merchant": "Halcyon Design Studio",
      "timestamp": "2026-06-20T19:57:01.937Z",
      "reference": "REF-8VNRAM"
    },
    {
      "id": "txn_da52e1ef2ffb70a746915c00",
      "amount": 155.71,
      "currency": "USD",
      "type": "payment",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Refunds between €10 and €100
GET /api/transactions?type=refund&currency=EUR&minAmount=10&maxAmount=100&count=5
{
  "data": [
    {
      "id": "txn_8016cfb6a5c85eac58cdd40f",
      "amount": 42.19,
      "currency": "EUR",
      "type": "refund",
      "status": "completed",
      "description": "Refund from Orchard Lane Grocers",
      "merchant": "Orchard Lane Grocers",
      "timestamp": "2026-05-29T17:14:05.327Z",
      "reference": "REF-0DNSNH"
    },
    {
      "id": "txn_f248abeccba6fd45df91c366",
      "amount": 27.98,
      "currency": "EUR",
      "type": "refund",
      "status": "completed",
      "description": "Refund from Brightcart Market",
      "merchant": "Brightcart Market",
      "timestamp": "2026-06-17T10:38:28.649Z",
      "reference": "REF-RH7T93"
    },
    {
      "id": "txn_90902c05ac838fecf0b9c416",
      "amount": 21.02,
      "currency": "EUR",
      "type": "refund",
      "status": "pending",
      "description": "Refund from Nimbus Streaming",
      "merchant": "Nimbus Streaming",
      "timestamp": "2026-06-11T23:40:40.997Z",
      "reference": "REF-O8VNRA"
    },
    {
      "id": "txn_fda52e1ef2ffb70a746915c0",
      "amount": 10.11,
      "currency": "EUR",
      "type": "refund",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Completed whole-yen payments in Q1 2026
GET /api/transactions?currency=JPY&type=payment&status=completed&from=2026-01-01&to=2026-03-31&count=20
{
  "data": [
    {
      "id": "txn_58016cfb6a5c85eac58cdd40",
      "amount": 2294,
      "currency": "JPY",
      "type": "payment",
      "status": "completed",
      "description": "Payment to Solstice Fitness Club",
      "merchant": "Solstice Fitness Club",
      "timestamp": "2026-02-23T05:33:00.886Z",
      "reference": "REF-70DNSN"
    },
    {
      "id": "txn_8f248abeccba6fd45df91c36",
      "amount": 1,
      "currency": "JPY",
      "type": "payment",
      "status": "completed",
      "description": "Payment to Brightcart Market",
      "merchant": "Brightcart Market",
      "timestamp": "2026-02-09T18:53:40.283Z",
      "reference": "REF-ORH7T9"
    },
    {
      "id": "txn_790902c05ac838fecf0b9c41",
      "amount": 71,
      "currency": "JPY",
      "type": "payment",
      "status": "completed",
      "description": "Payment to Northwind Apparel",
      "merchant": "Northwind Apparel",
      "timestamp": "2026-02-01T03:39:25.625Z",
      "reference": "REF-OO8VNR"
    },
    {
      "id": "txn_2fda52e1ef2ffb70a746915c",
      "amount": 1710,
      "currency": "JPY",
      "type": "payment",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Failed transactions for error-state UIs
GET /api/transactions?status=failed&count=5&seed=7
{
  "data": [
    {
      "id": "txn_c7e2436f61bcde1a237f61fd",
      "amount": 1593.19,
      "currency": "USD",
      "type": "transfer",
      "status": "failed",
      "description": "Transfer to Granite Trust Savings",
      "merchant": "Granite Trust Savings",
      "timestamp": "2026-05-16T23:26:36.670Z",
      "reference": "REF-VNLT2B"
    },
    {
      "id": "txn_0ed5cab8a9dd45683e96ae0b",
      "amount": 572.5,
      "currency": "USD",
      "type": "transfer",
      "status": "failed",
      "description": "Transfer to Sterling Investment Fund",
      "merchant": "Sterling Investment Fund",
      "timestamp": "2026-07-10T16:44:42.283Z",
      "reference": "REF-1TTUKI"
    },
    {
      "id": "txn_01cdce3b5a6e1db3ad9ee1bc",
      "amount": 2038.35,
      "currency": "USD",
      "type": "refund",
      "status": "failed",
      "description": "Refund from Maple & Main Diner",
      "merchant": "Maple & Main Diner",
      "timestamp": "2026-07-07T08:05:23.253Z",
      "reference": "REF-FC6XF3"
    },
    {
      "id": "txn_46a2bfcd9982cf8a877eee4e",
      "amount": 1405.21,
      "currency": "USD",
      "type": "deposit",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates a plausible payment ledger. Every record is fake — no real accounts, merchants or money — but internally coherent: the description always names the record's actual merchant with a verb matching its type ("Payment to …", "Refund from …", "Withdrawal at …"), and each type draws from its own realistic counterparty pool — stores and services for payments/refunds, accounts for transfers, payroll and clients for deposits, ATMs and branches for withdrawals.

Every filter genuinely constrains the output:

  • minAmount/maxAmount bound every amount (inclusive), and amounts always carry the currency's ISO 4217 minor unit: JPY/KRW give whole numbers, KWD up to three decimals, everything else two. Amounts lean toward the lower end of the range, like real ledgers. Impossible combinations fail loudly — minAmount above maxAmount, an unknown currency, or a range so narrow no representable amount exists (e.g. currency=JPY&minAmount=0.2&maxAmount=0.8) each return a 400 explaining the problem.
  • type pins every record to one of payment / refund / transfer / deposit / withdrawal; omitted, you get a weighted mix with payments most common.
  • status pins the status; omitted, statuses follow a realistic split: 80% completed, 12% pending, 8% failed.
  • from/to bound every timestamp (inclusive); by default you get the past 90 days. Date-only values mean midnight UTC, and from > to is a 400.

id (txn_ + 24 hex) and reference (REF- + 6 alphanumerics) look like real payment-processor identifiers, and with a seed the same request returns byte-identical transactions forever.

Use it for

  • Seed banking, budgeting or expense-tracker demos with months of plausible ledger history
  • Test list UIs — filters, pagination, running totals, CSV export — against a realistic transaction feed
  • Reproducible payment fixtures in CI via seed, including JPY/KWD decimal edge cases

Frequently asked questions

Do amounts and dates respect my bounds?

Yes — minAmount/maxAmount and from/to genuinely constrain every record; that's contract-tested, not decorative.

Are seeded results stable during the day?

Yes — the default date window snaps to UTC midnight, so the same seed returns identical transactions all day (a drift bug we explicitly engineered away).

What do records include?

Id, amount with ISO currency, type, status, description, merchant and an ISO 8601 timestamp — a checkout table in one call.

Standards & references