# Create guest users

Guest Users allow you to initiate transactions instantly without forcing your customers through an immediate signup flow. You can create Guest Users silently on your backend as soon as a buyer hits checkout or a seller lists an item.

To create a new guest user, send a `POST` request to the `/v2/guest_users` endpoint.

```CURL Create guest users
curl -i -X POST \
  -u '<API_KEY>:' \
  'https://api.test.trustap.com/v2/guest_users' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "sarah.garcia@example.shop",
    "first_name": "Sarah",
    "last_name": "Garcia",
    "country_code": "ie",
    "tos_acceptance": {
      "unix_timestamp": 1736354931,
      "ip": "127.0.0.1"
    }
  }'
```

Response

```JSON
{
    "created_at": "2025-01-24T15:43:20.310247061Z",
    "email": "sarah.garcia@example.shop",
    "id": "1-886e3c26-b585-4c92-a93b-e3c84b9b32e9"
}
```

## Create full users

Guest users allow you to initiate transactions instantly without forcing your customers through an immediate signup flow. You can create guest users silently on your backend as soon as a buyer hits checkout or a seller lists an item.

To create a new guest user, send a `POST` request to the `/v2/guest_users` endpoint.

## Apply users in a transaction

Once users are created, use the returned `id` as the `seller_id` and `buyer_id` when creating a transaction.
Once you have generated your user IDs (whether they are guest IDs or full user IDs), pass them as the `buyer_id` and `seller_id` parameters when initializing a new transaction.

```CURL Create transaction with user IDs
curl -i -X POST \
  -u '<API_KEY>:' \
  https://api.test.trustap.com/v2/transactions \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 20000,
    "amount_extra": 0,
    "buyer_id": "1-def29dfe-8626-48a2-8863-b6fdf2b96ff0",
    "currency": "gbp",
    "description": "Trustap socks",
    "fees_buyer": 640,
    "fees_config": 1,
    "fees_seller": 0,
    "image_url": "https://docs.trustap.com/images/trustap-socks.png",
    "payment_method": "card",
    "role": "seller",
    "seller_id": "1-3f546125-2ec2-4b14-87f6-54a14ae73e98"
  }'
```

## Transitioning to full users

Guest accounts are intended to serve as transaction placeholders to maximize your checkout conversion. Because of this architectural design, you cannot directly convert or upgrade a Guest User record into a Full User record.

When a guest seller is ready to receive a payout, they must register for a completely separate full user account using our [secure OAuth flow](/docs/guides/transactions/full-users).

For a Full User to successfully claim a transaction and receive its payout, the email address verified during the OAuth flow must exactly match the email address you assigned to the guest user when the transaction was created.