API Access

Access transaction data programmatically using the Flintn API.

Prerequisites

An API key with transaction.read or transaction.search permission. See Authentication.

Get a Transaction

Retrieve a single transaction by ID.

curl -X GET https://api.flintn.com/v1/transactions/txn_abc123def456 \
  -H "X-Api-Key: pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response:

{
  "id": "txn_abc123def456",
  "amount": 2999,
  "currency": "USD",
  "status": "SETTLED",
  "customer_id": "cust_123456",
  "customer_email": "john.doe@example.com",
  "card_brand": "visa",
  "card_last4": "4242",
  "card_exp_month": 12,
  "card_exp_year": 2025,
  "avs_result": "Y",
  "cvv_result": "M",
  "subscription_id": "sub_xyz789",
  "created_at": "2024-01-15T10:30:00Z",
  "captured_at": "2024-01-15T10:30:05Z",
  "settled_at": "2024-01-16T08:00:00Z"
}

List Transactions

Retrieve multiple transactions with optional filters.

Query Parameters

Parameter
Type
Description

limit

integer

Number of results (default: 20, max: 100)

offset

integer

Pagination offset

status

string

Filter by status

customer_id

string

Filter by customer ID

subscription_id

string

Filter by subscription ID

card_brand

string

Filter by card brand

min_amount

integer

Minimum amount in cents

max_amount

integer

Maximum amount in cents

created_after

string

ISO 8601 datetime

created_before

string

ISO 8601 datetime

Response:

Search Transactions

Search transactions with advanced filters.

Search Request Body

Field
Type
Description

filters

object

Filter conditions

sort

object

Sort configuration

limit

integer

Results per page

offset

integer

Pagination offset

Filter Options

Filter
Type
Description

status

array

List of statuses to include

customer_id

string

Exact customer ID match

customer_email

string

Exact email match

subscription_id

string

Exact subscription ID match

card_brand

array

List of card brands

card_last4

string

Last 4 digits

amount

object

gte and/or lte values in cents

created_at

object

gte and/or lte ISO dates

Sort Options

Field
Description

created_at

Sort by creation date

amount

Sort by amount

status

Sort by status

Set order to asc or desc.

Transaction Fields

Core Fields

Field
Type
Description

id

string

Unique transaction ID

amount

integer

Amount in minor units (cents)

currency

string

Three-letter currency code

status

string

Current status

created_at

string

ISO 8601 creation timestamp

Customer Fields

Field
Type
Description

customer_id

string

Your customer identifier

customer_email

string

Customer email

customer_name

string

Customer name

billing_address

object

Billing address details

Card Fields

Field
Type
Description

card_brand

string

visa, mastercard, amex, discover

card_last4

string

Last 4 digits

card_exp_month

integer

Expiration month

card_exp_year

integer

Expiration year

card_bin

string

Bank Identification Number

Risk Fields

Field
Type
Description

avs_result

string

AVS verification result code

cvv_result

string

CVV verification result code

fraud_score

number

Risk score (0-100)

Relationship Fields

Field
Type
Description

subscription_id

string

Associated subscription ID

refund_of

string

Original transaction ID (for refunds)

Timestamp Fields

Field
Type
Description

authorized_at

string

When authorization occurred

captured_at

string

When capture occurred

settled_at

string

When settlement occurred

voided_at

string

When void occurred

refunded_at

string

When refund occurred

Code Examples

JavaScript

Python

Pagination

For large result sets, use pagination:

Error Responses

404 Not Found

403 Forbidden

Next Steps

Last updated