Payara will automatically send payment notifications to your configured callback URL when transaction events occur. This provides real-time updates about transaction status changes.
When a payment event occurs, Payara will send an HTTP POST request to your configured callback URL with the following JSON format:
{
"event": "TOPUP_SUCCESS",
"request_id": "03fa4371-a5b6-491d-b5d2-3a21d756b6a9",
"transaction_uuid": "topupb349-e50c-4f65-e72b-b0d49c78",
"amount": 20000,
"created_at": "2026-02-10T09:03:10.944370Z"
}
| Header | Value | Description |
|---|---|---|
Content-Type |
application/json | Request content type |
User-Agent |
Payara-Webhook/1.0 | Identifies the webhook source |
| Parameter | Type | Description |
|---|---|---|
event |
string | Type of payment event that occurred |
request_id |
string | The request_id is a unique number generated from the request process |
transaction_uuid |
string | Unique identifier for the transaction |
amount |
integer | Transaction amount (in IDR) |
created_at |
string | ISO 8601 timestamp when the event was created |
| Event Type | Description |
|---|---|
TOPUP_SUCCESS |
Top-up transaction completed successfully |
TOPUP_FAILED |
Top-up transaction failed |
Your callback endpoint must respond with HTTP status code 200 to acknowledge receipt. If Payara does not receive a successful response, it will automatically retry the callback.
Expected Response Format:
{
"success": true,
"message": "Callback received"
}
If your callback endpoint fails to respond or returns an error, Payara will retry sending the callback:
Always validate that the webhook payload contains all required fields before processing:
if (!isset($payload['event']) || !isset($payload['transaction_uuid'])) {
// Reject invalid payload
}
Store processed transaction UUIDs to prevent duplicate processing:
if (isTransactionProcessed($payload['transaction_uuid'])) {
// Already processed, return success without reprocessing
return ['success' => true, 'message' => 'Already processed'];
}
Always configure your callback URL with HTTPS to ensure secure communication.
If Payara provides IP whitelisting, verify that webhook requests come from authorized IP addresses.
Log all webhook requests for debugging and audit purposes:
error_log("Webhook: " . json_encode($payload));
{info} Make sure to test your webhook endpoint in the Sandbox environment before moving to Production.
You can test your webhook endpoint using tools like:
curl -X POST https://your-domain.com/webhook/payment \
-H "Content-Type: application/json" \
-d '{
"event": "TOPUP_SUCCESS",
"request_id": "03fa4371-a5b6-491d-b5d2-3a21d756b6a9"
"transaction_uuid": "topupb349-e50c-4f65-e72b-b0d49c78",
"amount": 20000,
"created_at": "2026-02-10T09:03:10.944370Z"
}'
Possible Causes:
Solutions:
Possible Causes:
Solutions:
Possible Causes:
Solutions:
Possible Causes:
Solutions: