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-Signatureheader.
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: Bearerheaders for all API requests. - Webhooks fire on
payment.succeededand relevant security deposit events.
Support
For help with API access or webhooks, contact PayRequest support at support@payrequest.io.Related Documentation
- See API Tokens for detailed token creation and management.
- See Webhook Development for building webhook integrations.