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

# Direct Payments

> Create a payment directly from your application.

Use Direct Payments when your application already has its own payment experience and needs Vaayu to process the payment.

## Create a payment

Send a `POST` request to `/send-payment`.

```bash theme={null}
curl -X POST "https://vaayuapi.onrender.com/send-payment"   -H "x-api-key: sk_test_xxxxxxxxxxxxxxxxxxxx"   -H "Content-Type: application/json"   -d '{
    "amount": 100,
    "to": "0x..."
  }'
```

### Request

| Field | Type | Required | Description |
| - | - | - | - |
| `amount` | number | Yes | Amount to send. |
| `to` | string | Yes | Recipient address. |

<Note>
  Use the exact address format supported by your configured payment rail.
</Note>

## Response

A successful request returns information that your application can use to track the transaction.

```json theme={null}
{
  "tx_hash": "0x...",
  "status": "pending"
}
```

Save the `tx_hash`. You will use it to retrieve the transaction status and correlate webhook events.

## Payment status

A newly created payment may initially be `pending`.

```text theme={null}
pending
   ↓
confirmed
```

If processing fails:

```text theme={null}
pending
   ↓
failed
```

Your application should not assume that a payment is complete simply because the payment creation request succeeded.

## Recommended integration

1. Create the payment.
2. Store the returned transaction hash.
3. Wait for the webhook notification.
4. Update your application's payment record.
5. Query the transaction endpoint when reconciliation is required.

<Warning>
  Do not automatically submit the same payment again just because your client did not receive an HTTP response. First determine whether the original transaction was created.
</Warning>

<CardGroup cols={2}>
  <Card title="Payment Status" icon="clock" href="/payment-status">
    Learn how to check a transaction after creating a payment.
  </Card>

  <Card title="Webhooks" icon="webhook">
    Learn how to receive transaction updates automatically.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.