> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fossapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crypto Transfer

> Make crypto transfer in USDT and USDC

## Request

<ParamField header="x-api-key" type="string" required>
  API Key for authentication
</ParamField>

<ParamField body="customerId" type="string" required>
  UUID of the customer making the transfer
</ParamField>

<ParamField body="recipient" type="string" required>
  Recipient wallet address
</ParamField>

<ParamField body="network" type="string" required>
  The blockchain network for the transfer. Must be one of: `solana`, `evm`
</ParamField>

<ParamField body="currency" type="string" required>
  The cryptocurrency to transfer. Must be one of: `usdc`, `usdt`
</ParamField>

<ParamField body="amount" type="number" required>
  The amount to transfer
</ParamField>

### Request Example

```bash theme={null}
curl -X POST https://api-production.fossapay.com/api/v1/transfers/crypto \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "550e8400-e29b-41d4-a716-446655440000",
    "recipient": "2nNrjVxaAv***1JBn52FqyHMjZ76SaHmsBv6Zz7Xoo5v",
    "network": "solana",
    "currency": "usdc",
    "amount": 100.50
  }'
```

```javascript theme={null}
const response = await fetch('https://api-production.fossapay.com/api/v1/transfers/crypto', {
  method: 'POST',
  headers: {
    'x-api-key': 'your_api_key_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    customerId: '550e8400-e29b-41d4-a716-446655440000',
    recipient: '2nNrjVxaAv***1JBn52FqyHMjZ76SaHmsBv6Zz7Xoo5v',
    network: 'solana',
    currency: 'usdc',
    amount: 100.50
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}

const transfer = await response.json();
```

## Response

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": true,
    "message": "processing crypto transaction",
    "data": {
      "token": {
        "symbol": "usdc",
        "amount": 100.50
      },
      "network": "solana",
      "recipientAddress": "2nNrjVxaAv***1JBn52FqyHMjZ76SaHmsBv6Zz7Xoo5v",
      "senderAddress": "EtNrjVxaAv***1JBn52FqyHMjZ76SaHmsBv6Zz7Xoo5v",
      "status": "processing"
    }
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json Error Response (400) theme={null}
  {
    "status": false,
    "message": "Bad request",
    "error": "Invalid customer ID"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json Error Response (500) theme={null}
  {
    "status": false,
    "message": "Internal server error",
    "error": "Transaction processing failed"
  }
  ```
</ResponseExample>
