# Config

The package reads its settings from these config keys. Set each through its environment variable, or publish the config file to `config/` and edit it there. A key without an environment variable is set only in the published file.

## paymongo

`config/paymongo.php`

| Key | Environment variable | Default | Description |
| --- | --- | --- | --- |
| `paymongo.secret_key` | `PAYMONGO_SECRET_KEY` | `null` |  |
| `paymongo.public_key` | `PAYMONGO_PUBLIC_KEY` | `null` |  |
| `paymongo.base_url` | `PAYMONGO_BASE_URL` | `'https://api.paymongo.com/v1'` |  |
| `paymongo.livemode` | `PAYMONGO_LIVEMODE` | `false` |  |
| `paymongo.http.timeout` | `PAYMONGO_TIMEOUT` | `30` |  |
| `paymongo.http.retries` | `PAYMONGO_RETRIES` | `2` | Retries after the first attempt; 0 disables retrying. |
| `paymongo.http.retry_delay` | `PAYMONGO_RETRY_DELAY` | `200` | Base delay in milliseconds; it doubles on every retry, with jitter. |
| `paymongo.http.max_retry_delay` | `PAYMONGO_MAX_RETRY_DELAY` | `5000` | Longest single wait in milliseconds. A Retry-After beyond it is not waited for. |
| `paymongo.idempotency.auto` | `PAYMONGO_AUTO_IDEMPOTENCY` | `true` |  |
| `paymongo.webhooks.secret` | `PAYMONGO_WEBHOOK_SECRET` | `null` | Default signing secret (webhook endpoint's secret_key from PayMongo). |
| `paymongo.webhooks.secrets` |  | `[]` | Named secrets for multiple endpoints: ['orders' => env(...)] |
| `paymongo.webhooks.modes` |  | `[]` | Named endpoint modes: ['orders' => false]. Unlisted names use livemode above. |
| `paymongo.webhooks.tolerance` | `PAYMONGO_WEBHOOK_TOLERANCE` | `300` | Max allowed clock drift for the signature timestamp, seconds. 0 disables the check. |
| `paymongo.webhooks.dedupe.enabled` | `PAYMONGO_WEBHOOK_DEDUPE` | `true` |  |
| `paymongo.webhooks.dedupe.ttl` |  | `86400` |  |
| `paymongo.webhooks.dedupe.store` | `PAYMONGO_WEBHOOK_DEDUPE_STORE` | `null` |  |
