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

# API Access and Webhooks

> Configure API tokens, webhooks, and access control

# API Access and Webhooks

PayRequest allows you to generate API tokens to programmatically access business data and to configure webhooks for real-time event notifications.

## API Token Authorization

* API access requires your business account to have an active Premium or Business subscription.
* Suspended or unpaid merchant accounts cannot generate or use API tokens.
* Team members and linked account sessions cannot use API tokens or webhooks.

## Webhooks

* Configure a single HTTPS endpoint URL for webhooks receiving payment and deposit events.
* On saving a webhook URL, a signing secret is generated.
* Verify webhook events by checking the `X-PayRequest-Signature` header.

## Security Best Practices

* Protect your API tokens and webhook secrets securely.
* Rotate secrets immediately if compromised.
* Verify webhook signatures using constant-time comparison to defeat timing attacks.

## Usage

* Use API tokens in `Authorization: Bearer` headers for all API requests.
* Webhooks fire on `payment.succeeded` and relevant security deposit events.

## Support

For help with API access or webhooks, contact PayRequest support at [support@payrequest.io](mailto:support@payrequest.io).

## Related Documentation

* See [API Tokens](https://docs.payreque.st/business-settings/api-tokens.md) for detailed token creation and management.
* See [Webhook Development](https://docs.payreque.st/advanced-features/webhook-development.md) for building webhook integrations.


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