> For the complete documentation index, see [llms.txt](https://developers.frontstream.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.frontstream.com/argofire/transaction-lifecycle-and-status-codes.md). Agents can also search and read this documentation through its [MCP server](https://developers.frontstream.com/~gitbook/mcp).

# Transaction Lifecycle & Status Codes

<figure><img src="https://1759075701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIS9AkCawNWrhCXwEyUbh%2Fuploads%2FOgmHAPtT5nzsLmavRnqf%2Fmedium.png?alt=media&amp;token=0f8a4ca4-c1dc-4c0b-a09b-0b71576f08e4" alt=""><figcaption></figcaption></figure>

***

#### Supported Transaction Types

The API supports the following transaction types:

| Transaction Type        | Description                                                                                                                  |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Sale**                | A combined authorization and capture of funds in a single step.                                                              |
| **Pre-Authorization**   | Authorization only, holds funds without capture.                                                                             |
| **Force Authorization** | Capture with an authorization code. Used in exceptional cases.                                                               |
| **Return**              | Refund or credit applied to a settled transaction.                                                                           |
| **Repeat Sale**         | A repeat sale transaction that uses a previously stored token to charge the customer again without re-entering payment data. |

*Note:* Recurring payment processing is handled via a separate recurring payments API and is not part of these transaction types.

***

#### Transaction Status Values

The **transactionStatus** field in API responses can hold the following documented values:

| Status       | Description                                                   |
| ------------ | ------------------------------------------------------------- |
| **Approved** | Transaction successfully authorized or captured.              |
| **Declined** | Transaction declined by card issuer or processor.             |
| **Error**    | Processing error due to invalid data or system failure.       |
| **Void**     | Authorization canceled before capture/settlement.             |
| **Refunded** | Amount refunded to the cardholder from a settled transaction. |
| **Pending**  | Transaction awaiting further processing or settlement.        |

***

#### HTTP Response Status Codes

The API uses standard HTTP status codes. The documented ones include:

| Code | Meaning                                                   |
| ---- | --------------------------------------------------------- |
| 200  | Request processed successfully.                           |
| 201  | Resource created successfully (e.g., transaction logged). |
| 400  | Bad request due to invalid or missing parameters.         |
| 401  | Unauthorized: invalid or missing API credentials.         |
| 403  | Forbidden: insufficient permissions.                      |
| 404  | Resource not found.                                       |
| 409  | Conflict, such as duplicate transactions.                 |
| 500  | Internal server error.                                    |

***

#### Key Response Fields

The following fields are included in the API transaction responses relevant to lifecycle and status:

* **transactionId:** Unique identifier for the transaction.
* **transactionType:** One of the documented transaction types above (Sale, Pre-Authorization, etc.).
* **transactionStatus:** Status value from the documented set (Approved, Declined, etc.).
* **responseCode:** Numeric processor or gateway result code.
* **responseText:** Human-readable description of the transaction outcome.
* **authCode:** Issuer authorization code, when applicable.
* **timestamp:** Date and time of the transaction or last status update.

***

#### Best Practices

* Rely primarily on **transactionStatus** and **responseCode** to drive your business logic.
* Log declined and error transactions for troubleshooting and customer support.
* Implement retries only for transient server or network failures, not for declined or error responses caused by invalid payment data or issuer decisions.
* Use **responseText** for user-facing messaging or logging.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.frontstream.com/argofire/transaction-lifecycle-and-status-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
