API Reference

Webhook Configuration Guide

Paystrator uses webhooks to notify your system in real time when important events occur. This guide explains how to configure, validate, and test webhook endpoints for both Send Money and Receive Money services.


πŸ“Œ Where to Find Webhook Settings

  1. Navigate to:
    Settings β†’ Developers
  2. You’ll see three tabs:
  • API Keys
  • IP Whitelist
  • Webhooks ← (this one)

πŸ” Webhook Verification Token

At the top of the Webhooks section, you’ll find the Webhook Verification Token.

  • This token is included in every webhook request sent from Paystrator.
  • Use it to verify the authenticity of incoming requests in your backend.
  • Click β€œView Webhook Verification Token” and copy it for use in your validation logic.
πŸ”’

We recommend storing this token securely as an environment variable.


πŸ”„ Webhook Types

Paystrator supports separate webhook endpoints for each service. All payloads are sent via POST requests.

1. Send Money Webhook

  • Used for disbursement status updates.
  • Field: Send Money Webhook URL
  • Example: Notify your backend when a payout is completed.

2. Receive Money Webhooks

Triggered when a customer makes a payment. You can configure separate endpoints for:

  • QR Code Payment Webhook URL
  • Virtual Account Webhook URL
  • eWallet Webhook URL
  • Credit Card Webhook URL
πŸ’‘

Multiple endpoints allow you to handle different payment types independently for cleaner logic.


πŸ§ͺ Testing Webhooks

Each webhook input field includes a β€œTest & Save” button.

When you click it:

  1. Your entered URL is saved.
  2. Paystrator sends a test webhook payload to your endpoint.
  3. The dashboard shows the HTTP status and response body returned by your server.
🚧

If the response is an error (e.g., 400 Bad Request), Paystrator will display the response body and headers to help you debug.

βœ… A 200 OK response confirms that your endpoint is reachable and correctly configured.


πŸ“„ Sample Payloads

πŸ”Έ Send Money - Successful Delivery

{
  "webhookType": "Create",
  "timestamp": "2023-10-05T14:30:00Z",
  "payloadSent": {
    "id":"QR_cae71e28xxx",
    "externalId":"ext-01",
    "amount":10000,
    "status":"PAID",
		"metadata" : "test",
    "createdAt":"2025-08-19T13:47:21.526+07:00",
		"paidAt":"2025-08-19T13:49:27.719+07:00"
  },
  "responseReceived": {
    "status": "success",
    "transactionId": "abc123"
  },
  "status": "Success"
}

πŸ”Έ QR Code Payment - Webhook Error

{
  "webhookType": "Error",
  "timestamp": "2023-10-05T14:30:00Z",
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The QR code webhook payload is malformed. Please verify the data structure and try again."
  },
  "status": "Failed"
}

βœ… Webhook Best Practices

  • βœ… Always verify authenticity using the Webhook Verification Token
  • βœ… Respond with HTTP 200 to acknowledge receipt β€” otherwise, Paystrator retries or marks it as failed
  • βœ… Keep processing light in your webhook handler; use background jobs for heavy work
  • βœ… Log every webhook event for troubleshooting and reconciliation
  • βœ… Restrict access to only Paystrator IPs and validated tokens

▢️ Next Step

Now that your webhooks are configured, you’re ready to send your first requests:

πŸ‘‰ Make Your First API Calls