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

# PHP

> SDK oficial de VenePagos para PHP.

### Instalación

Instala el SDK vía Composer:

```bash theme={null}
composer require venepagos/venepagos-php
```

### Uso básico

```php theme={null}
require 'vendor/autoload.php';

use VenePagos\Client;

$client = new Client('vp_live_xxxxxxxx', 'live');

try {
    // Consultar tasas
    $rates = $client->bank->getRates();
    echo "Tasa USD: " . $rates['USD'];

    // Ejecutar Transferencia
    $transfer = $client->bank->transfer([
        'destination_bank' => '0102',
        'destination_account' => '01020000000000000000',
        'amount' => 100.50,
        'description' => 'Pago de factura'
    ]);
    
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage();
}
```

### Integración con Laravel

Puedes añadir la API Key a tu archivo `.env`:

```env theme={null}
VENEPAGOS_API_KEY=vp_live_xxxxxxxx
VENEPAGOS_ENVIRONMENT=live
```

Y usar el Service Provider incluido (próximamente) o instanciarlo en un Singleton.
