Webhooks
BraidPay Webhooks Documentation
Overview
BraidPay uses webhooks to notify your application when payment events occur. When an event occurs, we'll make an HTTP POST request to your configured webhook URL with event details.
Setting Up Webhooks
Navigate to Settings > Webhooks in your BraidPay dashboard
Enter your webhook URL (must be HTTPS)
Enter a secure webhook secret
Save your configuration
Security
Each webhook request includes a signature in the X-Webhook-Signature
header. The signature is a HMAC SHA-256 hash of the payment address and amount using your webhook secret.
To verify that the webhook came from BraidPay:
The signature is generated using:
Your webhook secret (from BraidPay dashboard)
The payment destination address (
toAddress
)The payment amount (
amount
)
Always verify the signature before processing webhooks to ensure the request came from BraidPay.
Webhook Payload
Each webhook POST request contains a JSON payload with the following structure:
Field Descriptions
paymentLinkID
: The ID of the payment link, check your payment link page URL in the BraidPay dashboardpaymentID
: Unique identifier for the paymentfromAddress
: The sender's blockchain addresstoAddress
: Your receiving blockchain addresshash
: Transaction hash on the blockchainnetwork
: Blockchain network (ETHEREUM, POLYGON, BASE, SOLANA)token
: Token used for payment (USDC, USDT, PYUSD)amount
: Payment amountstatus
: Payment status (PENDING, COMPLETED)createdAt
: Timestamp when payment was createdPayer_Email
: Email address of the payer (if provided)
Retry Policy
If your webhook endpoint returns a non-2xx response code or fails to respond within 10 seconds, we'll retry the webhook with the following schedule:
1st retry: 1 minute after initial failure
2nd retry: 5 minutes after the previous attempt
3rd retry: 15 minutes after the previous attempt
4th retry: 30 minutes after the previous attempt
5th retry: 1 hour after previous attempt
After 5 failed attempts, the webhook will be marked as failed and no further retries will be attempted.
Best Practices
Verify the webhook signature to ensure the request came from BraidPay
Return a 2xx status code as quickly as possible
Process webhook data asynchronously
Handle duplicate webhook deliveries (use
paymentID
for idempotency)
Testing Webhooks
Use the "Test Webhook" button in the webhook settings to send a test payload
Test payload will contain dummy data with "test" values
Verify your endpoint can:
Validate the signature
Parse the JSON payload
Handle the data appropriately
Respond within the timeout period
Support
If you need help with webhooks:
Ensure your endpoint is accessible and properly configured
Verify your signature validation implementation
Contact support if issues persist
Last updated