Organization transactions

Review transactions across the organization's merchants from the Dashboard — inspect attempts, refund, and void.

These endpoints roll up transactions from every merchant in the organization: filter and open a charge, walk its per-attempt routing timeline, and act on it — refund captured funds or void an authorization.

It is the org-wide window into payment activity. The transaction object and its timeline match the public API; this view aggregates them across merchants for oversight and support.

These endpoints power the Tokeflow Dashboard UI at the organization level. They are session-authenticated (JWT bearer) — the token comes from signing in to the Dashboard, not from an sk_/pk_ API key. Requests also carry the x-organization-id header, and the signed-in user must be a member of that organization.

The transaction object

Returned by the list and retrieve endpoints on this page.

FieldTypeDescription
idstringTransaction ID.
organization_idstringOrganization ID.
merchant_idstringMerchant ID.
order_idstring | nullAuto-created order ID.
subscription_idstring | nullSubscription created from this CIT, when the underlying offer is recurring. Null for one-time charges and for non-recurring orders.
external_order_idstring | nullExternal order ID from merchant system.
customer_idstring | nullCustomer ID.
payment_instrument_idstring | nullPayment instrument ID used for the transaction.
amount_authorizednumberAmount authorized in minor units.
amount_capturednumberAmount captured in minor units.
currencystringISO 4217 currency code.
payment_methodstringPayment method. One of credit_card, debit_card, pix, boleto, wallet.
charge_typestringType of charge. One of payment, setup_verification.
countrystringISO 3166-1 alpha-2 country code.
statusstringTransaction status. One of pending, pre_authorized, authorized, failed, canceled, voided, charged_back, refund_pending, capture_pending, refunded, partially_refunded, expired.
applied_routing_rule_idstring | nullRouting rule node that produced the successful attempt.
timelinearrayTimeline of transaction attempts with routing fallbacks.
payment_instructionsobject | nullPayment instructions for async methods (PIX, boleto). Null for synchronous card transactions.
metadataobject | nullMerchant-supplied metadata.
created_atstringCreation timestamp. (ISO 8601 UTC).
updated_atstringLast update timestamp. (ISO 8601 UTC).

Endpoints

GET/api/v1/org/transactions

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

List transactions for merchant.

Query parameters

FieldTypeRequiredDescription
pagenumberNoPage number (1-indexed). Default 1, min 1.
limitnumberNoNumber of items per page. Default 20, min 1, max 100.
statusarrayNoComma-separated list of transaction statuses to filter by
merchant_idstringNoFilter transactions by merchant ID
customer_referencestringNoFilter transactions by customer reference
order_idstringNoFilter transactions by order ID
date_fromstringNoFilter transactions created after this date (ISO 8601)
date_tostringNoFilter transactions created before this date (ISO 8601)
payment_methodstringNoFilter transactions by payment method
currencystringNoFilter transactions by currency (ISO 4217)

Example request

curl -G https://api.tokeflow.com/api/v1/org/transactions \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  --data-urlencode "page=1" \
  --data-urlencode "limit=20" \
  --data-urlencode "status=pending,authorized,failed" \
  --data-urlencode "merchant_id=mrc_123"

GET/api/v1/org/transactions/:id

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Get transaction by ID.

Path parameters

FieldTypeRequiredDescription
idstringYes

Example request

curl https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3"

Example response200

{
  "id": "tx_777",
  "organization_id": "org_123",
  "merchant_id": "mrc_123",
  "order_id": "ord_001",
  "subscription_id": "sub_001",
  "external_order_id": "order_888",
  "customer_id": "cust_123",
  "payment_instrument_id": "pi_123",
  "amount_authorized": 15000,
  "amount_captured": 15000,
  "currency": "BRL",
  "payment_method": "credit_card",
  "charge_type": "payment",
  "country": "BR",
  "status": "authorized",
  "applied_routing_rule_id": "node_2",
  "timeline": [
    {
      "attempt_number": 1,
      "is_fallback": false,
      "connector_id": "conn_a1b2c3",
      "provider_slug": "provider_b",
      "status": "success",
      "error_category": "TECH_ERROR",
      "error_code": "TIMEOUT",
      "started_at": "2025-11-28T13:00:00Z",
      "finished_at": "2025-11-28T13:00:05Z"
    }
  ],
  "payment_instructions": {
    "type": "pix",
    "qr_code_text": "00020126580014BR.GOV.BCB.PIX...",
    "qr_code_url": "https://psp-url.com/qrcode/image.png",
    "barcode": "string",
    "boleto_url": "https://example.com/webhooks/tokeflow",
    "due_date": "string",
    "expires_at": "2025-11-28T13:30:00Z"
  },
  "metadata": {},
  "created_at": "2025-11-28T13:00:00Z",
  "updated_at": "2025-11-28T13:00:09Z"
}

GET/api/v1/org/transactions/:id/attempts

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

List transaction attempts.

Path parameters

FieldTypeRequiredDescription
idstringYes

Example request

curl https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d/attempts \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3"

POST/api/v1/org/transactions/:id/capture

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Capture an authorized transaction.

Path parameters

FieldTypeRequiredDescription
idstringYes

Request fields

FieldTypeRequiredDescription
amountnumberNoOptional amount to capture in cents/minor unit. If not provided, the full authorized amount will be captured. For partial capture, must be less than or equal to amount_authorized.

Example request

curl -X POST https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d/capture \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15000
  }'

Example response200

{
  "id": "tx_777",
  "organization_id": "org_123",
  "merchant_id": "mrc_123",
  "order_id": "ord_001",
  "subscription_id": "sub_001",
  "external_order_id": "order_888",
  "customer_id": "cust_123",
  "payment_instrument_id": "pi_123",
  "amount_authorized": 15000,
  "amount_captured": 15000,
  "currency": "BRL",
  "payment_method": "credit_card",
  "charge_type": "payment",
  "country": "BR",
  "status": "authorized",
  "applied_routing_rule_id": "node_2",
  "timeline": [
    {
      "attempt_number": 1,
      "is_fallback": false,
      "connector_id": "conn_a1b2c3",
      "provider_slug": "provider_b",
      "status": "success",
      "error_category": "TECH_ERROR",
      "error_code": "TIMEOUT",
      "started_at": "2025-11-28T13:00:00Z",
      "finished_at": "2025-11-28T13:00:05Z"
    }
  ],
  "payment_instructions": {
    "type": "pix",
    "qr_code_text": "00020126580014BR.GOV.BCB.PIX...",
    "qr_code_url": "https://psp-url.com/qrcode/image.png",
    "barcode": "string",
    "boleto_url": "https://example.com/webhooks/tokeflow",
    "due_date": "string",
    "expires_at": "2025-11-28T13:30:00Z"
  },
  "metadata": {},
  "created_at": "2025-11-28T13:00:00Z",
  "updated_at": "2025-11-28T13:00:09Z"
}

POST/api/v1/org/transactions/:id/refund

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Refund a captured transaction.

Path parameters

FieldTypeRequiredDescription
idstringYes

Request fields

FieldTypeRequiredDescription
amountnumberNoAmount to refund in cents/minor unit. If not provided, full amount will be refunded.
reasonstringNoReason for the refund. One of duplicate, fraudulent, requested_by_customer.

Example request

curl -X POST https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d/refund \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "reason": "requested_by_customer"
  }'

Example response200

{
  "id": "tx_777",
  "refund_id": "ref_abc123",
  "status": "refund_pending",
  "amount_captured": 15000,
  "amount_refunded": 5000,
  "total_refunded": 5000,
  "updated_at": "2025-11-28T13:07:00Z"
}

GET/api/v1/org/transactions/:id/refunds

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

List refunds for a transaction.

Path parameters

FieldTypeRequiredDescription
idstringYes

Query parameters

FieldTypeRequiredDescription
pagenumberNoPage number (1-indexed). Default 1, min 1.
limitnumberNoNumber of items per page. Default 20, min 1, max 100.

Example request

curl -G https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d/refunds \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3" \
  --data-urlencode "page=1" \
  --data-urlencode "limit=20"

POST/api/v1/org/transactions/:id/void

Org

Auth: Dashboard session (JWT bearer). Organization membership required.

Void an authorized transaction.

Path parameters

FieldTypeRequiredDescription
idstringYes

Example request

curl -X POST https://api.tokeflow.com/api/v1/org/transactions/obj_1a2b3c4d/void \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…" \
  -H "x-organization-id: org_4b21e7c3"

Example response200

{
  "id": "tx_777",
  "status": "voided",
  "updated_at": "2025-11-28T13:06:00Z"
}

Errors

Errors use the standard envelope. The most common cases here:

HTTPMeaning
400Invalid parameters or a state that does not allow this operation.
401Missing, expired, or invalid Dashboard session token.
403Authenticated, but the signed-in user lacks access to this entity.
404The record does not exist or is not visible to this entity.

On this page