Skip to main content

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.