Mocks
πŸ“‹ Overview

Mock Endpoints Overview

Mock endpoints allow you to simulate webhook events and deposits for testing purposes. These endpoints are only available in staging environments.

⚠️ Important: Mock endpoints are only available in staging environment.

What Are Mock Endpoints?

Mock endpoints help you test your integration without waiting for real webhook events or making actual deposits. They simulate provider webhooks and deposit events, allowing you to:

  • Test webhook handling logic
  • Verify transaction status updates
  • Test deposit flows without real money
  • Debug integration issues in development/staging environments
  • Test both successful and failed scenarios

Available Mock Endpoints

1. Mock Deposit Webhook

Simulates deposit webhooks for Direct Exchange quotes and Virtual Bank Account (VBA) deposits.

Endpoints:

  • POST /api/v1/client/mock/simulate-deposit - For VBA-based deposits (any rail)
  • POST /api/v1/client/mock/direct-exchange-deposit-webhook - For Direct Exchange source funding

Use Cases:

  • Simulate deposits to Virtual Bank Accounts
  • Test Direct Exchange deposit flows
  • Test deposit webhook handling
  • Verify wallet balance updates

See Mock Deposit for detailed documentation.

2. Mock Payout Webhook

Simulates external provider payout webhooks for testing payout flows.

Endpoint:

  • POST /api/v1/client/mock/payout-webhook

Use Cases:

  • Test payout webhook handling
  • Simulate successful and failed payouts
  • Verify transaction status updates
  • Test payout flow end-to-end

See Mock Payout for detailed documentation.

Authentication

All mock endpoints require HMAC authentication (Business API Key). Include your API key and signature in the request headers:

x-api-key: <your-api-key>
x-timestamp: <RFC3339-timestamp>
x-signature: <HMAC-signature>

Note: For HMAC authentication details, see the Authentication guide.

Security Considerations

  • Authentication Required: All endpoints require valid HMAC authentication
  • Transaction Validation: Endpoints validate transaction states before processing

Best Practices

  1. Test Both Success and Failure - Use both "successful" and "failed" statuses to test error handling
  2. Verify Transaction States - Ensure transactions are in the correct state before simulating webhooks
  3. Check Wallet Balances - After simulating deposits, verify wallet balances update correctly
  4. Use Real Transaction References - Always use actual transaction references from your test environment
  5. Handle Errors Gracefully - Mock endpoints can fail; ensure your code handles errors appropriately

Related Documentation