> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Create Transaction entity.

- Product: Transactions
- Section: Transaction
- Snapshot: Current
- Method: `POST`
- Path: `/api/transactions/`

## Query parameters

### `receipt`

Type: `boolean`  
Required: no  

### `voucher`

Type: `string`  
Required: no  

### `organization`

Type: `number`  
Required: yes  

### `reservation`

Type: `number`  
Required: yes  

### `token`

Type: `string`  
Required: yes  

## Request body

Required: no  
Content types: `application/json`  

### `type`

Type: `string`  
Required: no  
Allowed values: `payment`, `refund`, `chargeback`  

### `amount`

Type: `string`  
Required: no  

### `redirectUrl`

Type: `string`  
Required: no  

### `webhookUrl`

Type: `string`  
Required: no  

### `paymentMethod`

Type: `object`  
Required: no  

#### `id`

Type: `number`  
Required: no  

## Execute with TypeScript

Package: `@recranet/sdk`  

```ts
import { RecranetApiClient } from "@recranet/sdk";

const client = new RecranetApiClient({ apiKey: process.env.RECRANET_API_KEY! });

const result = await client.transactions.create({
  organization: 0,
  reservation: 0,
  token: "<token>",
});
```

## Execute with curl

```bash
curl -X POST "https://app.recranet.com/api/transactions/" \
    -H "X-Api-Key: $RECRANET_API_KEY" \
    --url-query "organization=$ORGANIZATION" \
    --url-query "reservation=$RESERVATION" \
    --url-query "token=$TOKEN" \
    -H 'Content-Type: application/json' \
    -d '{}'
```

## Responses

### Response `200`

Category: success  

Successful response

#### `application/json`

##### Generated example

```json
{
  "id": 0,
  "processed": true,
  "cancelable": true,
  "refundable": true,
  "removable": true,
  "type": "payment",
  "status": "open",
  "amount": "-1581.00",
  "datetime": "datetime",
  "description": "description",
  "transactionId": "tr_7UhSN1zuXS",
  "paymentUrl": "paymentUrl",
  "created": "created",
  "modified": "modified"
}
```

##### Schema

###### Transaction

Type: `Transaction`  

###### `id`

Type: `number`  
Required: yes  

###### `type`

Type: `string`  
Required: no  
Allowed values: `payment`, `refund`, `chargeback`  

###### `status`

Type: `string`  
Required: no  
Allowed values: `open`, `cancelled`, `pending`, `authorized`, `expired`, `failed`, `paid`, `refunding`, `reclaimed`, `refunded`, `unknown`  

###### `amount`

Type: `string`  
Required: no  

###### `processed`

Type: `boolean`  
Required: yes  

Indicates whether the transaction has reached an end-state

###### `cancelable`

Type: `boolean`  
Required: yes  

###### `refundable`

Type: `boolean`  
Required: yes  

###### `removable`

Type: `boolean`  
Required: yes  

###### `datetime`

Type: `string`  
Format: `date-time`  
Required: no  

###### `description`

Type: `string`  
Required: no  

###### `transactionId`

Type: `string`  
Required: no  

###### `paymentUrl`

Type: `string`  
Required: no  

URL of the checkout/payment page for this transaction

###### `created`

Type: `string`  
Format: `date-time`  
Required: no  

###### `modified`

Type: `string`  
Format: `date-time`  
Required: no  

### Response `400`

Category: client-error  

Bad request

#### `application/json`

##### Example

```json
{
  "statusCode": 400,
  "description": "Bad request",
  "errors": [
    "Bad request"
  ]
}
```

##### Schema

###### object

Type: `object`  

## Related representations

- [Human documentation](/transactions/methods/create/)
- [TypeScript Markdown](/transactions/methods/create.md?lang=typescript)
- [curl Markdown](/transactions/methods/create.md?lang=curl)
- [site llms.txt](/llms.txt)
- [product llms.txt](/transactions/llms.txt)
- [snapshot llms.txt](/transactions/llms.txt)
