---
title: "$viva->getConfig()"
method: GET
path: "/VivaClient/getConfig"
tags: ["VivaClient"]
---

# $viva->getConfig()

`GET /VivaClient/getConfig`

Retourne l'objet `Config` pour introspection ou débogage.

```php
$config = $viva->getConfig();
echo $config->merchantId;
echo $config->environment->value; // 'demo' ou 'production'
echo $config->isProduction();     // bool
echo $config->apiUrl();           // 'https://demo-api.vivapayments.com'
echo $config->legacyUrl();        // 'https://demo.vivapayments.com'
echo $config->checkoutUrl();      // 'https://demo.vivapayments.com/web/checkout'
echo $config->accountsUrl();      // 'https://demo-accounts.vivapayments.com'
```

## Response `200`

Objet `Config`

- Config — Objet de configuration interne. **Méthodes :** - `apiUrl(): string` - `legacyUrl(): string` - `checkoutUrl(): string` - `accountsUrl(): string` - `isProduction(): bool`
  - `merchantId` string
  - `apiKey` string
  - `clientId` string
  - `clientSecret` string
  - `environment` 'demo' | 'production' — `QrCommunication\VivaMerchant\Enums\Environment` Backed enum PHP 8.1+ avec valeurs string.

---

[API](https://skmtc.net/qrcommunication/apis/viva-wallet-merchant-sdk-re-fe-rence-php.md) · [All operations](https://skmtc.net/qrcommunication/apis/viva-wallet-merchant-sdk-re-fe-rence-php/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qrcommunication/viva-wallet-merchant-sdk-re-fe-rence-php/versions/bcafd06ce584/schema)
