Skip to main content

Get Transaction

Retrieve a specific transaction from your store.

By default the response contains the transaction's base fields, including the money breakdown and refund hints. Use the include query parameter to expand related sections — the order, customer, invoices, and individual refunds — in the same call.

Request

GET /transactions/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringYesTransaction UUID

Query Parameters

ParameterTypeRequiredDescription
includestringNoComma-separated list of sections to expand. Allowed values: order, customer, invoices, refunds. Unknown values are ignored.
note

A section that is not requested is returned as null — the key is always present, so the response shape stays stable. Requesting include=refunds therefore leaves order, customer, and invoices as null.

Example Request

curl -X GET "https://cart.easy.tools/api/v1/transactions/550e8400-e29b-41d4-a716-446655440000?include=order,customer,invoices,refunds" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response

Success Response (200)

Returns a single transaction. The example below requests all sections.

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"remote_id": "pi_3PqL2kEa1b2c3d4e",
"provider": "stripe",
"provider_name": "Stripe",
"refund_state": "partial",
"total": 11800,
"net_amount": 10486,
"tax_amount": 1314,
"refunded_amount": 3900,
"remaining_refundable": 7900,
"currency": "pln",
"customer_email": "buyer@example.com",
"product_name": "Premium Course",
"is_subscription_followup": false,
"refundable": true,
"date": "2026-05-27T10:16:00+00:00",
"order": {
"id": "550e8400-e29b-41d4-a716-446655440050",
"status": "completed",
"product_name": "Premium Course",
"quantity": 1
},
"customer": {
"id": "7a1b2c3d-4e5f-6789-abcd-ef0123456789",
"email": "buyer@example.com",
"name": "Jane Doe"
},
"invoices": [
{
"id": "5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e",
"number": "EASY/2026/05/123",
"issued_at": "2026-05-27T10:20:00+00:00",
"type": "invoice"
}
],
"refunds": [
{
"amount": 3900,
"net_amount": 3171,
"tax_amount": 729,
"refund_reason": "requested_by_customer",
"refunded_at": "2026-05-28T09:00:00+00:00",
"keep_access": false
}
]
}

A lean read (no include) returns the base fields with every section set to null:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"remote_id": "pi_3PqL2kEa1b2c3d4e",
"provider": "stripe",
"provider_name": "Stripe",
"refund_state": "none",
"total": 11800,
"net_amount": 10486,
"tax_amount": 1314,
"refunded_amount": 0,
"remaining_refundable": 11800,
"currency": "pln",
"customer_email": "buyer@example.com",
"product_name": "Premium Course",
"is_subscription_followup": false,
"refundable": true,
"date": "2026-05-27T10:16:00+00:00",
"order": null,
"customer": null,
"invoices": null,
"refunds": null
}

Response Fields

FieldTypeNullableDescription
idstringNoUnique identifier for the transaction (UUID)
remote_idstringYesThe provider's own transaction id (e.g. Stripe payment-intent id). Null for legacy rows.
providerstringYesPayment provider: stripe, tpay, or paypo. Null for legacy rows.
provider_namestringYesHuman-readable provider name (e.g. "Stripe", "Tpay", "PayPo")
refund_statestringNoDerived refund state: none, partial, or full.
totalintegerNoCaptured amount in minor units (e.g. cents/grosze)
net_amountintegerYesNet amount in minor units
tax_amountintegerYesTax amount in minor units
refunded_amountintegerNoTotal already refunded against this transaction, in minor units
remaining_refundableintegerNoMaximum amount a new refund may request (total - refunded_amount)
currencystringNoLowercase ISO currency code (e.g. "pln")
customer_emailstringYesCustomer email, recorded on the transaction
product_namestringNoProduct name from the order, cached at purchase time
is_subscription_followupbooleanNoWhether this is a subscription renewal payment
refundablebooleanNoWhether the order's refund window is still open. A hint only — refunds are gated by the payment provider, not by this flag.
datestringNoWhen the payment was settled (ISO 8601 format)
orderobjectYesThe transaction's order. null unless order is included.
customerobjectYesThe transaction's customer. null unless customer is included.
invoicesarrayYesTax documents issued for the transaction. null unless invoices is included.
refundsarrayYesRefunds issued against the transaction. null unless refunds is included.

order

FieldTypeNullableDescription
idstringNoOrder identifier (UUID)
statusstringYesOrder status: created, awaiting_payment, processing, completed, canceled, or refunded. Null for legacy orders without a status.
product_namestringNoPrimary product name, cached at purchase time
quantityintegerNoQuantity of the primary product

customer

Resolved from the order's account. When the account no longer exists, id is null and the email/name fall back to the values recorded on the transaction itself.

FieldTypeNullableDescription
idstringYesCustomer identifier (UUID). Null when there is no linked account.
emailstringYesCustomer email
namestringYesCustomer full name

invoices[]

FieldTypeNullableDescription
idstringNoInvoice identifier (UUID). Pass to Get Invoice to read the full document.
numberstringYesInvoice number
issued_atstringYesWhen the invoice was issued (ISO 8601 format)
typestringNoDocument type: invoice or correction.

refunds[]

FieldTypeNullableDescription
amountintegerNoRefunded amount in minor units
net_amountintegerYesNet portion of the refund in minor units
tax_amountintegerYesTax portion of the refund in minor units
refund_reasonstringYesReason recorded for the refund
refunded_atstringYesWhen the refund was processed (ISO 8601 format)
keep_accessbooleanNoWhether the customer kept product access after the refund

Error Responses

Bad Request (400)

{
"message": "Invalid transaction ID"
}

Transaction Not Found (404)

{
"message": "Transaction with ID <UUID> not found"
}

Unauthorized (401)

{
"message": "Unauthenticated."
}