> For the complete documentation index, see [llms.txt](https://docs.smartfastpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartfastpay.com/thesmartway/api-requests/transactions.md).

# Transactions

***

### <mark style="color:green;">GET</mark> /transaction/{id}

{% hint style="info" %}
**Request**
{% endhint %}

```bash
curl -v --location --request GET 'https://sandbox.smartfastpay.com/v2/transaction/{id}' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <Access-Token>' \'
```

{% hint style="info" %}
**Response**
{% endhint %}

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": {
        "id": "744252be-fe0b-4209-838c-93635b157951",
        "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
        "transaction_id": "b08e3897-6505-4bb4-81a5-6e3a1d29e277",
        "amount": "300.00",
        "currency": "USD",
        "status": "pending",
        "type": "payment",
        "method": "bank_transfer",
        "payment_status": "pending",
        "created_at": "2021-11-11T19:08:20.000000Z",
        "updated_at": "2021-11-11T19:08:20.000000Z"
    }
}
```

{% hint style="info" %}
**Response details**
{% endhint %}

<table><thead><tr><th width="202">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>id</code></mark></td><td>The created payment by the request made unique identificator.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td>The customer id stored on your platform for future identification.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td>The id of the transaction generated in you platform.</td></tr><tr><td><mark style="color:red;"><code>amount</code></mark></td><td>The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.</td></tr><tr><td><mark style="color:red;"><code>status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>open</code></mark>, <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>paid</code></mark>, <mark style="color:red;"><code>canceled</code></mark></td></tr><tr><td><mark style="color:red;"><code>type</code></mark></td><td>Shows the type of this transaction. <mark style="color:red;"><code>payment</code></mark> or <mark style="color:red;"><code>payout</code></mark></td></tr><tr><td><mark style="color:red;"><code>method</code></mark></td><td>Shows the payment method of this transaction, usually <mark style="color:red;"><code>bank_transfer</code></mark> or <mark style="color:red;"><code>pix</code></mark></td></tr><tr><td><mark style="color:red;"><code>payment_status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>paid</code></mark>, <mark style="color:red;"><code>denied</code></mark>, <mark style="color:red;"><code>expired</code></mark></td></tr><tr><td><mark style="color:red;"><code>payout_status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>success</code></mark>, <mark style="color:red;"><code>failed</code></mark>, <mark style="color:red;"><code>onhold</code></mark>, <mark style="color:red;"><code>returned</code></mark>, <mark style="color:red;"><code>refunded</code></mark></td></tr><tr><td><mark style="color:red;"><code>created_at</code></mark></td><td>The date and time the transaction was created.</td></tr><tr><td><mark style="color:red;"><code>updated_at</code></mark></td><td>The date and time the transaction was updated with new status.</td></tr></tbody></table>

***

### <mark style="color:green;">GET</mark> /transactions

{% hint style="info" %}
**Request**
{% endhint %}

```bash
# Without parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/v2/transactions' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer < Access-Token >' \'
```

```bash
# With parameters

curl -v --location --request GET 'https://sandbox.smartfastpay.com/v2/transactions?limit=1&order=id,desc' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer < Access-Token >' \'
```

{% hint style="info" %}
**Parameters detail**
{% endhint %}

<table><thead><tr><th width="192">Parameter</th><th width="269" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>limit</code></mark></td><td align="center"><mark style="color:red;"><code>integer</code></mark><br><mark style="color:red;"><code>min: 1 | max: 40</code></mark></td><td>The number of items to return in the response.</td></tr><tr><td><mark style="color:red;"><code>page</code></mark></td><td align="center"><mark style="color:red;"><code>integer</code></mark><br><mark style="color:red;"><code>min: 1 | max: 9999999</code></mark></td><td>The page number indicating which set of items will be returned in the response. So, the combination of <mark style="color:red;"><code>page=1</code></mark> and <mark style="color:red;"><code>limit=20</code></mark> returns the first 20 items. The combination of <mark style="color:red;"><code>page=2</code></mark> and <mark style="color:red;"><code>limit=20</code></mark> returns items 21 through 40.</td></tr><tr><td><mark style="color:red;"><code>sort</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Format: item,(asc|desc)</code></mark></td><td>Sorts the items in the response by filter in ascending or descending order.<br>Eg.: <mark style="color:red;"><code>sort=id,desc</code></mark><br><em>(This combination returns a list in descending order based on id.)</em></td></tr><tr><td><mark style="color:red;"><code>start_time</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Internet date and time format</code></mark></td><td>The start date and time for the range to show in the response, in <a href="https://tools.ietf.org/html/rfc3339#section-5.6">Internet date and time format</a>.<br>Eg.: <mark style="color:red;"><code>start_time=2021-09-05T11:00:00Z</code></mark>.</td></tr><tr><td><mark style="color:red;"><code>end_time</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>Internet date and time format</code></mark></td><td>The end date and time for the range to show in the response, in <a href="https://tools.ietf.org/html/rfc3339#section-5.6">Internet date and time format</a>.<br>Eg.: <mark style="color:red;"><code>end_time=2021-09-05T11:00:00Z</code></mark>.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark><br><mark style="color:red;"><code>min: 1 | max: 255</code></mark></td><td>Sorts the items in the response by looking for the customer_id that was once provided by your system.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td align="center"><mark style="color:red;"><code>string</code></mark></td><td>Sorts the items in the response by looking for the transaction_id that was once provided by your system.<br>To get multiple transaction_id, send each transaction_id separating by comma (,).<br>Eg.: <mark style="color:red;"><code>8fecdfcc-4e4d-11ee</code></mark><code>,</code><mark style="color:red;"><code>8fece5ee-4e4d-11ee</code></mark><code>, </code><mark style="color:red;"><code>d42953be-4e4d-11ee</code></mark></td></tr></tbody></table>

{% hint style="info" %}
**Response**
{% endhint %}

```json
{
    "requestId": "a2435636-5f69-447d-8e22-8382f62ef7dd",
    "data": [
        {
            "id": "b2a9a131-ba69-4722-a2de-67062268bc27",
            "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
            "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
            "amount": "980.00",
            "currency": "USD",
            "status": "pending",
            "type": "payout",
            "payout_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        },
        {
            "id": "744252be-fe0b-4209-838c-93635b157951",
            "customer_id": "58f0c005-3b7d-4c75-81f3-93b9a6fee864",
            "transaction_id": "b08e3897-6505-4bb4-81a5-6e3a1d29e277",
            "amount": "300.00",
            "currency": "USD",
            "status": "pending",
            "type": "payment",
            "method": "bank_transfer",
            "payment_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        },
        {
            "id": "af78bccd-cc66-4e92-8ee6-56b3d6686327",
            "customer_id": "d9e9557e-11a5-49df-b51b-d513a7f5b348",
            "transaction_id": "22dd9e47-97c7-4982-af50-3d3e0782d054",
            "amount": "980.00",
            "currency": "USD",
            "status": "pending",
            "type": "payment",
            "method": "pix",
            "payment_status": "pending",
            "created_at": "2021-11-11T19:08:20.000000Z",
            "updated_at": "2021-11-11T19:08:20.000000Z"
        }
    ]
}
```

{% hint style="info" %}
**Response details**
{% endhint %}

<table><thead><tr><th width="202">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>id</code></mark></td><td>The created payment by the request made unique identificator.</td></tr><tr><td><mark style="color:red;"><code>customer_id</code></mark></td><td>The customer id stored on your platform for future identification.</td></tr><tr><td><mark style="color:red;"><code>transaction_id</code></mark></td><td>The id of the transaction generated in you platform.</td></tr><tr><td><mark style="color:red;"><code>amount</code></mark></td><td>The amount that the client specified when initiating the transaction showed IN DOLLARS (use dot instead of comma)</td></tr><tr><td><mark style="color:red;"><code>currency</code></mark></td><td>The currency type that the amount will be credited. If USD is provided there will be a conversion from USD to BRL, if BRL is provided there will be no conversion.</td></tr><tr><td><mark style="color:red;"><code>status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>open</code></mark>, <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>paid</code></mark>, <mark style="color:red;"><code>canceled</code></mark></td></tr><tr><td><mark style="color:red;"><code>type</code></mark></td><td>Shows the type of this transaction. <mark style="color:red;"><code>payment</code></mark> or <mark style="color:red;"><code>payout</code></mark></td></tr><tr><td><mark style="color:red;"><code>method</code></mark></td><td>Shows the payment method of this transaction, usually <mark style="color:red;"><code>bank_transfer</code></mark> or <mark style="color:red;"><code>pix</code></mark></td></tr><tr><td><mark style="color:red;"><code>payment_status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>paid</code></mark>, <mark style="color:red;"><code>denied</code></mark>, <mark style="color:red;"><code>expired</code></mark></td></tr><tr><td><mark style="color:red;"><code>payout_status</code></mark></td><td>The current status of the payment. These are our statuses: <mark style="color:red;"><code>pending</code></mark>, <mark style="color:red;"><code>success</code></mark>, <mark style="color:red;"><code>failed</code></mark>, <mark style="color:red;"><code>onhold</code></mark>, <mark style="color:red;"><code>returned</code></mark>, <mark style="color:red;"><code>refunded</code></mark></td></tr><tr><td><mark style="color:red;"><code>created_at</code></mark></td><td>The date and time the transaction was created.</td></tr><tr><td><mark style="color:red;"><code>updated_at</code></mark></td><td>The date and time the transaction was updated with new status.</td></tr></tbody></table>
