Mock Payout Webhook
Simulate external provider payout webhooks for testing purposes. This endpoint constructs webhook payloads that match the exact format expected by real webhook handlers.
Endpoint
POST /api/v1/client/mock/payout-webhook
Description
Simulates payout webhooks from external providers. The endpoint:
- Constructs webhook payloads matching real provider formats
- Sends them to the appropriate webhook handlers
- Updates transaction statuses accordingly
- Supports both successful and failed payout scenarios
Authentication
This endpoint requires HMAC authentication (Business API Key). Include your API key and signature in the request headers:
Note: For HMAC authentication details, see the Authentication guide.
Request Body
Success Response (200 OK)
Response Fields
Error Responses
Example: cURL
Example: HTTP Request
Use Cases
- Testing Payout Flows - Simulate payout webhooks to test your payout handling logic
- Transaction Status Testing - Verify transaction statuses update correctly after payouts
- Webhook Testing - Test webhook handling without real payouts
- Integration Testing - Test end-to-end payout flows in staging environments
- Error Handling - Test both successful and failed payout scenarios
Important Notes
- Transaction Must Exist: The transaction reference must point to an existing payout transaction
- Production Blocked: This endpoint is automatically blocked in production environments
- Webhook Processing: The simulated webhook goes through the same processors as real webhooks
- Transaction Updates: Successful webhooks will update transaction statuses accordingly
Best Practices
- Use Real Transaction References - Always use actual transaction references from your test environment
- Test Both Statuses - Test both
"successful"and"failed"statuses to ensure error handling works - Verify Transaction States - Ensure transactions are in the correct state before simulating webhooks
- Check Transaction Updates - After simulating webhooks, verify transaction statuses updated correctly
- Handle Errors Gracefully - Mock endpoints can fail; ensure your code handles errors appropriately
Security Considerations
- Production Blocking: This endpoint is automatically blocked in production environments
- Authentication Required: Requires valid HMAC authentication
- Transaction Validation: Endpoint validates transaction states before processing
Related Endpoints
- Mock Deposit - Simulate deposit webhooks
- Mock Fund Wallet - Credit wallet balance directly on staging
- Transactions API - View transaction details and statuses
- Wallets API - Check wallet balances
- Quotes API - Create quotes before testing payout flows