---
updatedAt: 2025-08-12T18:55:16.000Z
agentTools:
  projectIndex: https://docs.staxpayments.com/llms.txt
---

# Get a Related Transaction

Retrieve a child transactions associated with a parent transaction.

The Get a Related Transaction endpoint allows you to retrieve child transactions associated with a parent transaction. Child transactions include voids and refunds linked to the original transaction. This is useful for tracking the history and changes made to a transaction.

## Key Features

* Retrieve all child transactions related to a specific transaction.
* Understand the sequence of actions taken on a transaction.
* Access details of voids and refunds associated with the transaction.

***

## Usage Notes

**Valid Transaction ID:** Only works with charge transaction IDs. Voided and refunded transaction IDs will not return related transactions.

**Response Data:** The response includes an array of child transactions, each with its own details.

**Tracking Changes:** Use this endpoint to audit the actions taken on a transaction over time.

***

## Response Structure

| Code | Response              | Reason                                                                             |
| :--- | :-------------------- | :--------------------------------------------------------------------------------- |
| 200  | Success               | Returns an array of child transaction objects related to the original transaction. |
| 400  | Bad Request           | Invalid transaction ID format.                                                     |
| 401  | Unauthorized          | Authentication failed.                                                             |
| 404  | Not Found             | Transaction ID does not exist or has no related transactions.                      |
| 500  | Internal Server Error | An unexpected error occurred on the server.                                        |

***

## Important Considerations

**Data Integrity:** Use related transactions to ensure data consistency and accurate financial reporting.

**Error Handling:** Implement proper error handling for scenarios where no related transactions are found.

**Permissions:** Ensure the user or API key has the necessary permissions to access transaction details.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "stax-api",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://apiprod.fattlabs.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "API key for merchant-level operations. Provides access to merchant-specific endpoints including transactions, payments, customer management, and merchant account settings. This key is scoped to a single merchant account and cannot access partner-level functionality."
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/transaction/{id}/related": {
      "get": {
        "summary": "Get a Related Transaction",
        "description": "Retrieve a child transactions associated with a parent transaction.",
        "operationId": "get-a-related-transaction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  {\n    \"id\": \"3872e334-bba1-4bbd-91fc-bb3f48c74b1a\",\n    \"invoice_id\": \"\",\n    \"reference_id\": \"890eda03-0cb5-4c51-813d-8f1959d1a591\",\n    \"recurring_transaction_id\": \"\",\n    \"type\": \"refund\",\n    \"source\": null,\n    \"merchant_id\": \"dd36b936-1eb7-4ece-bebc-b514c6a36ebd\",\n    \"user_id\": \"b58d7eee-e68d-4d12-a1f8-62f5e71382ae\",\n    \"customer_id\": \"50d14fcb-b468-4ac4-afd8-d7c47172dc1c\",\n    \"payment_method_id\": \"23c06bc1-7473-46fb-8d65-b8e9bde1fe75\",\n    \"is_manual\": null,\n    \"success\": true,\n    \"message\": null,\n    \"meta\": {\n      \"tax\": 0,\n      \"subtotal\": 2,\n      \"lineItems\": [\n        {\n          \"id\": \"optional-fm-catalog-item-id\",\n          \"item\": \"Demo Item\",\n          \"details\": \"this is a regular demo item\",\n          \"quantity\": 1,\n          \"price\": 22\n        }\n      ]\n    },\n    \"total\": 22,\n    \"method\": \"card\",\n    \"pre_auth\": false,\n    \"last_four\": \"1111\",\n    \"receipt_email_at\": null,\n    \"receipt_sms_at\": null,\n    \"created_at\": \"2017-03-29 16:15:43\",\n    \"updated_at\": \"2017-03-29 16:15:43\",\n    \"total_refunded\": null,\n    \"is_refundable\": false,\n    \"is_voided\": null,\n    \"is_voidable\": false,\n    \"schedule_id\": null,\n    \"customer\": {\n      \"id\": \"50d14fcb-b468-4ac4-afd8-d7c47172dc1c\",\n      \"firstname\": \"Mario\",\n      \"lastname\": \"Henderson\",\n      \"company\": \"\",\n      \"email\": \"fatttest737@gmail.com\",\n      \"cc_emails\": null,\n      \"phone\": \"5555555555\",\n      \"address_1\": \"123 S ST.\",\n      \"address_2\": \"\",\n      \"address_city\": \"Orlando\",\n      \"address_state\": \"FL\",\n      \"address_zip\": \"3222\",\n      \"address_country\": \"USA\",\n      \"notes\": \"\",\n      \"reference\": \"\",\n      \"options\": \"\",\n      \"created_at\": \"2017-01-30 20:41:23\",\n      \"updated_at\": \"2017-01-30 20:41:23\",\n      \"deleted_at\": null,\n      \"gravatar\": \"//www.gravatar.com/avatar/52b3ef2ae70945ce0fca14086443dc1a\"\n    },\n    \"child_transactions\": [],\n    \"files\": [],\n    \"payment_method\": {\n      \"id\": \"23c06bc1-7473-46fb-8d65-b8e9bde1fe75\",\n      \"customer_id\": \"50d14fcb-b468-4ac4-afd8-d7c47172dc1c\",\n      \"merchant_id\": \"dd36b936-1eb7-4ece-bebc-b514c6a36ebd\",\n      \"user_id\": \"41e60252-4f23-48de-a64f-e5a1e8a9359c\",\n      \"nickname\": \"VISA: Mario Mario (ending in: 1111)\",\n      \"is_default\": 0,\n      \"method\": \"card\",\n      \"person_name\": \"Mario Henderson\",\n      \"card_type\": \"visa\",\n      \"card_last_four\": \"1111\",\n      \"card_exp\": \"022020\",\n      \"bank_name\": null,\n      \"bank_type\": null,\n      \"bank_holder_type\": null,\n      \"address_1\": null,\n      \"address_2\": null,\n      \"address_city\": null,\n      \"address_state\": null,\n      \"address_zip\": null,\n      \"address_country\": \"USA\",\n      \"purged_at\": null,\n      \"deleted_at\": null,\n      \"created_at\": \"2017-01-30 20:48:13\",\n      \"updated_at\": \"2017-01-30 20:48:13\",\n      \"card_exp_datetime\": \"2020-02-29 23:59:59\",\n      \"customer\": {\n        \"id\": \"50d14fcb-b468-4ac4-afd8-d7c47172dc1c\",\n        \"firstname\": \"Mario\",\n        \"lastname\": \"Henderson\",\n        \"company\": \"\",\n        \"email\": \"fatttest737@gmail.com\",\n        \"cc_emails\": null,\n        \"phone\": \"5555555555\",\n        \"address_1\": \"123 S ST.\",\n        \"address_2\": \"\",\n        \"address_city\": \"Orlando\",\n        \"address_state\": \"FL\",\n        \"address_zip\": \"3222\",\n        \"address_country\": \"USA\",\n        \"notes\": \"\",\n        \"reference\": \"\",\n        \"options\": \"\",\n        \"created_at\": \"2017-01-30 20:41:23\",\n        \"updated_at\": \"2017-01-30 20:41:23\",\n        \"deleted_at\": null,\n        \"gravatar\": \"//www.gravatar.com/avatar/52b3ef2ae70945ce0fca14086443dc1a\"\n      }\n    },\n    \"user\": {\n      \"id\": \"b58d7eee-e68d-4d12-a1f8-62f5e71382ae\",\n      \"system_admin\": true,\n      \"name\": \"Demo Mann\",\n      \"email\": \"contact@example.com\",\n      \"email_verification_sent_at\": \"2017-05-15 16:30:23\",\n      \"email_verified_at\": \"2017-03-29 15:27:21\",\n      \"is_api_key\": false,\n      \"created_at\": \"2017-01-11 21:44:02\",\n      \"updated_at\": \"2017-05-15 16:30:23\",\n      \"deleted_at\": null,\n      \"gravatar\": \"//www.gravatar.com/avatar/157965dea7cd2f44e349382d1d791650\",\n      \"team_admin\": null,\n      \"team_enabled\": null,\n      \"team_role\": null,\n      \"merchant_options\": [],\n      \"is_portal\": false\n    }\n  }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "3872e334-bba1-4bbd-91fc-bb3f48c74b1a"
                      },
                      "invoice_id": {
                        "type": "string",
                        "example": ""
                      },
                      "reference_id": {
                        "type": "string",
                        "example": "890eda03-0cb5-4c51-813d-8f1959d1a591"
                      },
                      "recurring_transaction_id": {
                        "type": "string",
                        "example": ""
                      },
                      "type": {
                        "type": "string",
                        "example": "refund"
                      },
                      "source": {},
                      "merchant_id": {
                        "type": "string",
                        "example": "dd36b936-1eb7-4ece-bebc-b514c6a36ebd"
                      },
                      "user_id": {
                        "type": "string",
                        "example": "b58d7eee-e68d-4d12-a1f8-62f5e71382ae"
                      },
                      "customer_id": {
                        "type": "string",
                        "example": "50d14fcb-b468-4ac4-afd8-d7c47172dc1c"
                      },
                      "payment_method_id": {
                        "type": "string",
                        "example": "23c06bc1-7473-46fb-8d65-b8e9bde1fe75"
                      },
                      "is_manual": {},
                      "success": {
                        "type": "boolean",
                        "example": true,
                        "default": true
                      },
                      "message": {},
                      "meta": {
                        "type": "object",
                        "properties": {
                          "tax": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "subtotal": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "lineItems": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": "optional-fm-catalog-item-id"
                                },
                                "item": {
                                  "type": "string",
                                  "example": "Demo Item"
                                },
                                "details": {
                                  "type": "string",
                                  "example": "this is a regular demo item"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                },
                                "price": {
                                  "type": "integer",
                                  "example": 22,
                                  "default": 0
                                }
                              }
                            }
                          }
                        }
                      },
                      "total": {
                        "type": "integer",
                        "example": 22,
                        "default": 0
                      },
                      "method": {
                        "type": "string",
                        "example": "card"
                      },
                      "pre_auth": {
                        "type": "boolean",
                        "example": false,
                        "default": true
                      },
                      "last_four": {
                        "type": "string",
                        "example": "1111"
                      },
                      "receipt_email_at": {},
                      "receipt_sms_at": {},
                      "created_at": {
                        "type": "string",
                        "example": "2017-03-29 16:15:43"
                      },
                      "updated_at": {
                        "type": "string",
                        "example": "2017-03-29 16:15:43"
                      },
                      "total_refunded": {},
                      "is_refundable": {
                        "type": "boolean",
                        "example": false,
                        "default": true
                      },
                      "is_voided": {},
                      "is_voidable": {
                        "type": "boolean",
                        "example": false,
                        "default": true
                      },
                      "schedule_id": {},
                      "customer": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "50d14fcb-b468-4ac4-afd8-d7c47172dc1c"
                          },
                          "firstname": {
                            "type": "string",
                            "example": "Mario"
                          },
                          "lastname": {
                            "type": "string",
                            "example": "Henderson"
                          },
                          "company": {
                            "type": "string",
                            "example": ""
                          },
                          "email": {
                            "type": "string",
                            "example": "fatttest737@gmail.com"
                          },
                          "cc_emails": {},
                          "phone": {
                            "type": "string",
                            "example": "5555555555"
                          },
                          "address_1": {
                            "type": "string",
                            "example": "123 S ST."
                          },
                          "address_2": {
                            "type": "string",
                            "example": ""
                          },
                          "address_city": {
                            "type": "string",
                            "example": "Orlando"
                          },
                          "address_state": {
                            "type": "string",
                            "example": "FL"
                          },
                          "address_zip": {
                            "type": "string",
                            "example": "3222"
                          },
                          "address_country": {
                            "type": "string",
                            "example": "USA"
                          },
                          "notes": {
                            "type": "string",
                            "example": ""
                          },
                          "reference": {
                            "type": "string",
                            "example": ""
                          },
                          "options": {
                            "type": "string",
                            "example": ""
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2017-01-30 20:41:23"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2017-01-30 20:41:23"
                          },
                          "deleted_at": {},
                          "gravatar": {
                            "type": "string",
                            "example": "//www.gravatar.com/avatar/52b3ef2ae70945ce0fca14086443dc1a"
                          }
                        }
                      },
                      "child_transactions": {
                        "type": "array"
                      },
                      "files": {
                        "type": "array"
                      },
                      "payment_method": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "23c06bc1-7473-46fb-8d65-b8e9bde1fe75"
                          },
                          "customer_id": {
                            "type": "string",
                            "example": "50d14fcb-b468-4ac4-afd8-d7c47172dc1c"
                          },
                          "merchant_id": {
                            "type": "string",
                            "example": "dd36b936-1eb7-4ece-bebc-b514c6a36ebd"
                          },
                          "user_id": {
                            "type": "string",
                            "example": "41e60252-4f23-48de-a64f-e5a1e8a9359c"
                          },
                          "nickname": {
                            "type": "string",
                            "example": "VISA: Mario Mario (ending in: 1111)"
                          },
                          "is_default": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "method": {
                            "type": "string",
                            "example": "card"
                          },
                          "person_name": {
                            "type": "string",
                            "example": "Mario Henderson"
                          },
                          "card_type": {
                            "type": "string",
                            "example": "visa"
                          },
                          "card_last_four": {
                            "type": "string",
                            "example": "1111"
                          },
                          "card_exp": {
                            "type": "string",
                            "example": "022020"
                          },
                          "bank_name": {},
                          "bank_type": {},
                          "bank_holder_type": {},
                          "address_1": {},
                          "address_2": {},
                          "address_city": {},
                          "address_state": {},
                          "address_zip": {},
                          "address_country": {
                            "type": "string",
                            "example": "USA"
                          },
                          "purged_at": {},
                          "deleted_at": {},
                          "created_at": {
                            "type": "string",
                            "example": "2017-01-30 20:48:13"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2017-01-30 20:48:13"
                          },
                          "card_exp_datetime": {
                            "type": "string",
                            "example": "2020-02-29 23:59:59"
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "50d14fcb-b468-4ac4-afd8-d7c47172dc1c"
                              },
                              "firstname": {
                                "type": "string",
                                "example": "Mario"
                              },
                              "lastname": {
                                "type": "string",
                                "example": "Henderson"
                              },
                              "company": {
                                "type": "string",
                                "example": ""
                              },
                              "email": {
                                "type": "string",
                                "example": "fatttest737@gmail.com"
                              },
                              "cc_emails": {},
                              "phone": {
                                "type": "string",
                                "example": "5555555555"
                              },
                              "address_1": {
                                "type": "string",
                                "example": "123 S ST."
                              },
                              "address_2": {
                                "type": "string",
                                "example": ""
                              },
                              "address_city": {
                                "type": "string",
                                "example": "Orlando"
                              },
                              "address_state": {
                                "type": "string",
                                "example": "FL"
                              },
                              "address_zip": {
                                "type": "string",
                                "example": "3222"
                              },
                              "address_country": {
                                "type": "string",
                                "example": "USA"
                              },
                              "notes": {
                                "type": "string",
                                "example": ""
                              },
                              "reference": {
                                "type": "string",
                                "example": ""
                              },
                              "options": {
                                "type": "string",
                                "example": ""
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2017-01-30 20:41:23"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2017-01-30 20:41:23"
                              },
                              "deleted_at": {},
                              "gravatar": {
                                "type": "string",
                                "example": "//www.gravatar.com/avatar/52b3ef2ae70945ce0fca14086443dc1a"
                              }
                            }
                          }
                        }
                      },
                      "user": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "b58d7eee-e68d-4d12-a1f8-62f5e71382ae"
                          },
                          "system_admin": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "name": {
                            "type": "string",
                            "example": "Demo Mann"
                          },
                          "email": {
                            "type": "string",
                            "example": "contact@example.com"
                          },
                          "email_verification_sent_at": {
                            "type": "string",
                            "example": "2017-05-15 16:30:23"
                          },
                          "email_verified_at": {
                            "type": "string",
                            "example": "2017-03-29 15:27:21"
                          },
                          "is_api_key": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2017-01-11 21:44:02"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2017-05-15 16:30:23"
                          },
                          "deleted_at": {},
                          "gravatar": {
                            "type": "string",
                            "example": "//www.gravatar.com/avatar/157965dea7cd2f44e349382d1d791650"
                          },
                          "team_admin": {},
                          "team_enabled": {},
                          "team_role": {},
                          "merchant_options": {
                            "type": "array"
                          },
                          "is_portal": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid ID": {
                    "value": "{\n  \"id\": [\n    \"The selected id is invalid.\"\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "The selected id is invalid."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```