Receive automated payment notifications to your server
Introduction
Webhooks are a great way to create a payment processor or custom payment flows without using too many resources. You can link your website endpoint in the Dashboard or by using the Create Webhook endpoint.
Validation
Poof provides a Shared Secret Key in your dashboard if to validate that an incoming Webhook is coming from Poof.
The secret key will posted within payload using the Dictionary Key:
{x-poof-signature: your_shared_secret}
Testing
You can test incoming webhooks by using the Poof Webhook Testing tool. Visit the Dashboard -> Developers -> Send Test Webhook.
A great way to view incoming test webhooks is by visiting: https://webhook.site to see raw responses.
A full example of an incoming webhook might look like this!
{"amount": "0.20",
"payment_method": "solana",
"currency": "usd",
"payment_id": "24675z8a",
"name": "Robert Robertson",
"email": "[email protected]",
"items": "Shoes",
"quantities": "1",
"date": "Dec 6, 05:23 AM 2022",
"note": "custom-form: custom_input example",
"paid": "yes",
"metadata": {"external": {"your_dictionary": "will be listed in external"},
"address": "5PEmyGfzdVuwGWVRcRAqZ9FyrNkxqSzNKGvk5Rtvh276", "due": "0.01413"},
"street_address": {"address": "1234 Main Street",
"city": "San Francisco", "state": "CA", "zipcode": "95150",
"country": "United States"},
"x-poof-signature": "0OgrjdRegx9OiF_H5EJm3w"}
Completed Response Types
These are examples of Response types sent in webhooks alongside the fetch transaction endpoint..
Poof offers multiple status types under the "paid" parameter depending if you're accepting or moving money with cryptocurrencies, bank transfers, or third party payment gateways.
- Payment Complete
- paid = "yes"
- Crypto Payout Sent
- paid = "payout"
- Crypto Payment Partially Paid
- paid = "paid_partial"
- Bank Transfer Sent
- paid = "transfer_out"
- Payment Processing
- paid = "pending"
- Bank Transfer/ Poof Balance Received
- paid = "transfer_in"
- Third party payment method pending
- paid = "hold"