# Create a Transaction

You can use this method to create a transaction from your application or interface. This method receives and retains value payment data for a period defined in the “ttl” key and returns a transaction identifier with no sensitive data.

{% tabs %}
{% tab title="cUrl" %}
**POST /V1/request**

```
curl -X POST https://api.firstoken.co/transactions/requests 
-H 'x-api-key: YOUR_API_KEY' 
-H "Content-Type: application/json"
```

{% endtab %}

{% tab title="Attributes of the request" %}
**chd** *{object}*

> Required: true
>
> Cards value represents an array of credit cards JSON object. Each object has the attributes:
>
> * **card**: *integer*
>
>   Example: 4242424242424242
>
>   Required:true\
>   An object with the CHD
> * **name**: *string*
>
>   Example: Steve Jobs
>
>   Required:true
>
>   The cardholder name.
> * **exp**: *string*
>
>   Example: 01/27
>
>   Required:true
>
>   A valid expiration card date with the format MM/YY.
> * **cvv**: *integer*
>
>   Example: 000
>
>   Required:true
>
>   A valid CVV code for the card.

**amount**: *integer*

> Required:true
>
> The amount of the capture. If you do not need to capture the amount value, you must send the amount value 0.
>
> Example: 100

**currency**: *string*

> Required:true
>
> The three digits ISO code for the currency.
>
> Example: USD

**additional\_info:** *{object}*

> Required: false
>
> An object with the additional fields. You can send multiples additional fields with every capture in the format {"key": "value"}
>
> Example: {"phone": "(555) 555-1234"}

**TTL**: *integer*

> Required: true
>
> The time to live of this capture is retained in Firstoken Capture measure in seconds. The maximum value for this field is 28800 seconds.
>
> Example: 300
> {% endtab %}
> {% endtabs %}

<details>

<summary>Example JSON request body</summary>

```json
{
    "chd": {
        "card": "4242424242424242",
        "name": "Jhon Smith",
        "exp": "01/25",
        "cvv": "1234"
    },
    "amount": 100,
    "currency": "USD",
    "additional_info": {
        "phone": "(555) 555-1234"
    },
    "ttl": 300
}
```

</details>

<details>

<summary>Example JSON response body</summary>

```json
{
    "status_code": 200,
    "status": "success",
    "desc": "Success",
    "data": {
        "id": {"4cae6bf0-d245-408e-8f6a-9e91f23396e6"}
    }
}
```

</details>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://firstoken.gitbook.io/api-docs/api-reference/transactions/create-a-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
