post https://api.edfapay.com/payment/merchants/callback-url
Overview
The Callback API allows merchants to configure their webhook URL, which EdfaPay uses to send real-time transaction notifications. Merchants can use these endpoints to check, add, or update their callback URL.
Endpoints
1. Check Callback URL
Retrieve the currently configured callback URL for a merchant.
HTTP Method: POST
Endpoint: https://api.edfapay.com/payment/merchants/callback-url
Request Example:
{
"action": "get",
"id": "EDFAPAY_MERCHANT_ID"
}Parameters:
action(String, Required): Must be"get"to retrieve the callback URL.id(String, Required): The unique identifier for the merchant.
2. Add / Update Callback URL
Add a new callback URL or update an existing one for a merchant.
HTTP Method: POST
Endpoint: https://api.edfapay.com/payment/merchants/callback-url
Request Example:
{
"action": "post",
"id": "EDFAPAY_MERCHANT_ID",
"url": "https://merchant-domain.com/webhook-handler"
}Parameters:
action(String, Required): Must be"post"to add or update the callback URL.id(String, Required): The unique identifier for the merchant.url(String, Required): The new callback URL where EdfaPay will deliver notifications.
Notes & Best Practices
- Ensure your callback URL is publicly accessible and supports HTTPS.
- Your webhook endpoint should validate the request signature (if provided by EdfaPay) to ensure authenticity.
- Respond with HTTP 200 within a reasonable timeframe (e.g., 5–10 seconds) to acknowledge receipt.
- Implement retries and idempotency in your system to handle duplicate notifications.