Transactions
Transactions are individual payment operations. They are read-only records created automatically when orders are placed, subscriptions are billed, or refunds are processed.
Transaction Types
| Type | Description | Created By |
|---|---|---|
sale |
Charge to customer | Order creation, subscription billing |
refund |
Funds returned | POST /orders/:id/refund |
auth |
Authorization hold | Pre-authorization flows |
Use transaction filters to build payment reports, reconcile with your accounting system, or track refund activity.
GET
/transactions List all transactions
Returns a paginated list of transactions sorted by creation date (newest first). Transactions are read-only records created automatically when orders are placed, subscriptions are billed, or refunds are processed.
Common Queries
| Use Case | Query |
|---|---|
| Successful sales | ?type=sale&status=succeeded |
| All refunds | ?type=refund |
| Failed payments | ?status=failed |
| For a specific order | ?order_id=6ba7b811-9dad-11d1-80b4-00c04fd430c8 |
| Revenue this month | ?type=sale&status=succeeded&created_at[gte]=2024-02-01 |
| High-value transactions | ?amount[gte]=10000 ($100+) |
Query parameters
NameTypeDescription
limit
integerNumber of items to return per page.
Default:
10starting_after
stringCursor for forward pagination. Returns items created after this ID.
e.g.
"550e8400-e29b-41d4-a716-446655440000"ending_before
stringCursor for backward pagination. Returns items created before this ID.
e.g.
"550e8400-e29b-41d4-a716-446655440001"sort
stringSort order. Format: `field[direction]` or `-field` for descending. Default: `created_at[desc]`.
e.g.
"created_at[desc]"customer_id
stringFilter by customer ID.
e.g.
"550e8400-e29b-41d4-a716-446655440000"order_id
stringFilter by order ID.
e.g.
"6ba7b811-9dad-11d1-80b4-00c04fd430d0"status
stringFilter: `pending`, `in_progress`, `succeeded`, `failed`, `voided`, `chargeback`.
e.g.
"succeeded"type
stringFilter: `sale`, `refund`, `auth`.
e.g.
"sale"amount[gte]
integerMinimum amount in cents.
e.g.
1000amount[lte]
integerMaximum amount in cents.
e.g.
100000created_at[gte]
stringFilter by creation date (on or after, ISO 8601).
e.g.
"2024-01-01"created_at[lt]
stringFilter by creation date (before, ISO 8601).
e.g.
"2024-02-01"expand
stringExpand: `customer`, `order`.
e.g.
"customer"fields[transactions]
stringSparse fieldsets — comma-separated (e.g., `id,type,status,amount,created`).
e.g.
"id,type,status,amount,created"Header parameters
NameTypeDescription
EPD-Version
stringAPI version override (format `YYYY-MM-DD`). If omitted, your account's pinned version or the latest version is used.
e.g.
"2026-02-11"Code samples
# Successful sales this month
curl "https://api.epd.com/v1/transactions?type=sale&status=succeeded&created_at[gte]=2024-02-01" \
-H "Authorization: Bearer epd_test_sk_xxxx"
# All refunds for a specific order
curl "https://api.epd.com/v1/transactions?order_id=6ba7b811-9dad-11d1-80b4-00c04fd430c8&type=refund" \
-H "Authorization: Bearer epd_test_sk_xxxx" // Calculate monthly revenue
const params = new URLSearchParams({
type: 'sale',
status: 'succeeded',
'created_at[gte]': '2024-02-01',
'created_at[lt]': '2024-03-01',
limit: '100',
});
const response = await fetch(
`https://api.epd.com/v1/transactions?${params}`,
{ headers: { 'Authorization': 'Bearer epd_test_sk_xxxx' } }
);
const { data: transactions } = await response.json();
const revenue = transactions.reduce((sum, t) => sum + t.amount, 0);
console.log(`Monthly revenue: $${(revenue / 100).toFixed(2)}`); Responses
200 A paginated list of transactions.
FieldTypeDescription
data
array[Transaction]url
anye.g.
"/v1/transactions" 401 Unauthorized — Authentication failed.
FieldTypeDescription
errorrequired
objecttyperequired
enumThe type of error.
invalid_request_errorauthentication_errorauthorization_errorrate_limit_erroridempotency_errorprocessing_errorwebhook_errorcoderequired
stringA short string identifying the specific error.
e.g.
"validation_error"messagerequired
stringA human-readable message providing details about the error.
e.g.
"Request validation failed"paramnullable
stringThe parameter that caused the error, if applicable.
e.g.
"email"request_id
stringUnique request identifier for debugging.
e.g.
"req_a1b2c3d4e5f67890abcdef0123456789"field_errors
array[object]Detailed field-level errors for validation failures.
GET
/transactions/{id} Retrieve a transaction
Path parameters
NameTypeDescription
idrequired
stringe.g.
"6ba7b813-9dad-11d1-80b4-00c04fd430c8"Query parameters
NameTypeDescription
expand
stringExpand: `customer`, `order`.
Header parameters
NameTypeDescription
EPD-Version
stringAPI version override (format `YYYY-MM-DD`). If omitted, your account's pinned version or the latest version is used.
e.g.
"2026-02-11"Responses
200 The transaction.
FieldTypeDescription
idrequired
stringe.g.
"6ba7b813-9dad-11d1-80b4-00c04fd430c8"typerequired
enumsalerefundauthe.g.
"sale"statusrequired
enumpendingin_progresssucceededfailedvoidedchargebacke.g.
"succeeded"amountrequired
integerAmount in cents.
e.g.
5998currencyrequired
stringe.g.
"usd"customer_idrequired
stringe.g.
"550e8400-e29b-41d4-a716-446655440002"order_idnullable
stringe.g.
"6ba7b811-9dad-11d1-80b4-00c04fd430d3"payment_methodnullable
objectid
stringe.g.
"6ba7b815-9dad-11d1-80b4-00c04fd430d2"card_last_four
stringe.g.
"4242"card_brand
stringe.g.
"visa"processor_responsenullable
objecttransaction_idnullable
stringe.g.
"epd_gw_12345"authorization_codenullable
stringe.g.
"AUTH123"avs_resultnullable
stringe.g.
"Y"cvv_resultnullable
stringe.g.
"M"response_codenullable
stringe.g.
"100"response_textnullable
stringe.g.
"Transaction Approved"failure_reasonnullable
stringdescriptionnullable
stringmetadata
Metadatacreated_atrequired
string (date-time)e.g.
"2024-01-15T10:30:00.000Z"updated_atrequired
string (date-time)e.g.
"2024-01-15T10:30:00.000Z" 404 Not Found — The requested resource doesn't exist.
FieldTypeDescription
errorrequired
objecttyperequired
enumThe type of error.
invalid_request_errorauthentication_errorauthorization_errorrate_limit_erroridempotency_errorprocessing_errorwebhook_errorcoderequired
stringA short string identifying the specific error.
e.g.
"validation_error"messagerequired
stringA human-readable message providing details about the error.
e.g.
"Request validation failed"paramnullable
stringThe parameter that caused the error, if applicable.
e.g.
"email"request_id
stringUnique request identifier for debugging.
e.g.
"req_a1b2c3d4e5f67890abcdef0123456789"field_errors
array[object]Detailed field-level errors for validation failures.