Version: 1.3 · Updated: 2026-10-14
1. Receive payment notifications
Use payment notifications to update orders in your application when a customer's Collection payment succeeds or is rejected. DLT sends an asynchronous HTTPS POST to your registered notification URL with a payment status of PAID or REJECTED. Build an endpoint on your server to receive and verify these requests.
DLT issues your merchant a notification signing token (also called a signing key) separately from your machine API client ID and client secret. DLT provides it through a secure channel as a token or a JSON file containing notification_signing_token, your merchant account ID and environment. Store this token securely on your server and use it to verify payment notifications.
Provide your HTTPS notification URL to DLT and confirm the signing token for each environment you use. Staging and production are configured separately. Notifications require both a registered URL and a signing token. The token remains valid until it is replaced; it is not a one-time password.
Keep your notification endpoint separate from the browser return URLs you provide in payment requests. success_url, failure_url and Direct Payment callback_url send your customer back to your website; they do not register your server to receive payment notifications.
Your endpoint receives the DLT payment status (PAID or REJECTED). You will not receive notifications for PENDING or unresolved payments. If a notification has not arrived, use Collection status and recovery to check your original transaction before deciding how to update your order.
2. Requests your endpoint receives
The examples below show requests your endpoint receives from DLT. The destination, references, event ID and timestamps are examples; use your registered notification URL when setting up your integration. Verify each request using its actual signature. DLT sends compact JSON; the examples are formatted for readability.
2.1 Paid payment
POST /payment-events HTTP/1.1
Host: merchant.example.test
Accept: application/json
X-DLT-Event-Id: evt_01k7examplepaymentnotification
X-DLT-Timestamp: 1791857160
X-DLT-Signature: sha256=<64-character-lowercase-hex-hmac>
Content-Type: application/json
{
"merchant_transaction_id": "ORDER202610130001",
"payment_status": "PAID",
"timestamp": "2026-10-13T10:06:00+08:00",
"amount": "1500.00",
"product_name": "Annual membership",
"product_description": "One year membership",
"product_reference_id": "MEMBERSHIP-2026",
"other_references": {
"other_reference_1": "POLICY-123",
"other_reference_1_caption": "Policy number",
"other_reference_2": null,
"other_reference_2_caption": null
}
}
2.2 Rejected payment payload
Your endpoint receives the same headers for a rejected payment. Each payment event has its own event ID.
{
"merchant_transaction_id": "ORDER202610130002",
"payment_status": "REJECTED",
"timestamp": "2026-10-13T10:07:00+08:00",
"amount": "1500.00",
"product_name": "Annual membership",
"product_description": "One year membership",
"product_reference_id": "MEMBERSHIP-2026",
"other_references": {
"other_reference_1": "POLICY-123",
"other_reference_1_caption": "Policy number",
"other_reference_2": null,
"other_reference_2_caption": null
}
}
2.3 Payload and header reference
Use this reference to validate the body and headers your endpoint receives from DLT.
| Field | Location | Requirement | Validation rules |
|---|---|---|---|
merchant_transaction_id |
JSON | Always sent | Your merchant reference from the original payment request. Match it to the order saved in your application. |
payment_status |
JSON | Always sent | Exactly PAID or REJECTED. PAID means payment successful; REJECTED means payment rejected. Never treat another value as paid. |
timestamp |
JSON | Always sent | ISO 8601 string with an explicit offset, from DLT's last reconciliation, falling back to the queue time. This is separate from the delivery timestamp header. |
amount |
JSON | Always sent | Decimal string with two fractional digits. Compare with the saved payment amount using decimal arithmetic. No currency field is sent; use the currency saved with the original payment. |
product_name |
JSON | Always sent, nullable | The product name you supplied in your original payment request; null if you omitted it. |
product_description |
JSON | Always sent, nullable | The product description you supplied in your original payment request; null if you omitted it. |
product_reference_id |
JSON | Always sent, nullable | The product reference ID/number you supplied in your original payment request; null if you omitted it. This is separate from your order reference in merchant_transaction_id. |
other_references |
JSON | Always sent | Your saved additional references and captions, with their original keys and values. Named entries arrive as a JSON object, as shown above. If no references were saved, you receive []. |
Accept, Content-Type |
Header | Always sent | application/json. |
X-DLT-Event-Id |
Header | Always sent | Opaque event identifier, stable across retries. Store it for duplicate detection; it is not included in the JSON body. |
X-DLT-Timestamp |
Header | Always sent | Unix timestamp in seconds as a string, generated for each delivery attempt. |
X-DLT-Signature |
Header | Always sent | sha256= followed by the lowercase hexadecimal HMAC-SHA256 described below. |
Expect the eight fields shown above in new notifications. Validate that merchant_transaction_id, payment_status, timestamp and amount are present and non-null. Product fields may be null. Use the product details and additional references to match the notification to information from your original payment request. These values stay the same if DLT retries the notification.
For compatibility, allow the four additional fields to be absent on older notifications queued before these fields became available in your DLT environment. Those notifications contain only the four core fields. Verify the signature before parsing or acting on the body; do not depend on JSON field order or whitespace when parsing it.
3. Verify the signature
Compute the expected signature using the notification signing token DLT issued to your merchant. The token is the HMAC secret in the formula below:
signed_message = X-DLT-Timestamp + "." + raw_request_body
expected_signature = "sha256=" + hex(HMAC-SHA256(notification_signing_token, signed_message))
Use the exact raw body bytes received, not re-encoded JSON, and compare the complete signature with a constant-time comparison. Reject missing or invalid signatures. Do not use your merchant machine OAuth access token or provider credentials as the signing secret.
Use your locally stored, DLT-issued notification signing token. DLT sends the calculated signature in X-DLT-Signature; it does not send your signing token in the request. You do not need to implement an X-DLT-Token header. Never derive the signing token from a request header or use your OAuth client secret or access token as the notification signing token.
DLT issues a replacement signing token when a key change is needed. Coordinate the transition with DLT before the replacement is activated: new notifications use the replacement immediately, while queued notifications keep their original signing key. During the agreed transition period, verify against your securely stored current and previous tokens. The headers do not include a signing key version. Remove the previous token when DLT confirms it is no longer needed.
Protect your endpoint against replayed requests by checking X-DLT-Timestamp against a freshness window appropriate for your integration and storing accepted event IDs. Your application is responsible for these checks. Use the delivery timestamp header for freshness checks; the JSON timestamp records when DLT reconciled the payment.
3.1 PHP signature comparison
This example verifies the signature on your merchant server. Set DLT_NOTIFICATION_SIGNING_TOKEN in your server environment to the token issued by DLT. Use the token exactly as provided, including its prefix; do not decode it as hexadecimal. The environment variable name below is an example for your application.
<?php
$signingToken = getenv('DLT_NOTIFICATION_SIGNING_TOKEN');
$timestamp = $_SERVER['HTTP_X_DLT_TIMESTAMP'] ?? '';
$receivedSignature = $_SERVER['HTTP_X_DLT_SIGNATURE'] ?? '';
$rawBody = file_get_contents('php://input');
if (!is_string($signingToken) || $signingToken === '') {
http_response_code(503);
exit('Notification verification is not configured.');
}
if (!is_string($timestamp) || !ctype_digit($timestamp)
|| !is_string($receivedSignature)
|| !preg_match('/^sha256=[a-f0-9]{64}$/D', $receivedSignature)
|| $rawBody === false) {
http_response_code(401);
exit('Invalid notification signature data.');
}
$expectedSignature = 'sha256=' . hash_hmac(
'sha256',
$timestamp . '.' . $rawBody,
$signingToken
);
if (!hash_equals($expectedSignature, $receivedSignature)) {
http_response_code(401);
exit('Invalid notification signature.');
}
// Signature verified. Apply your timestamp freshness and event-ID checks,
// validate the payment against your saved order, and persist it before 2xx.
Use hash_equals() for the comparison. Verify the exact raw body; decoding and re-encoding JSON can change the bytes and invalidate the signature. The sample checks one key; during a coordinated replacement, also check your securely stored previous key if the current key does not match.
4. Acknowledge and handle retries
Verify the signature, match the saved order reference and amount, and durably record the event and resulting order update before acknowledging it. Make duplicate event handling atomic: a retried notification must not fulfill an order or apply a financial effect twice. A previously accepted event should receive a successful acknowledgement again.
For example, return HTTP 204 with no body:
HTTP/1.1 204 No Content
DLT considers any HTTP 2xx response delivered. No response body or DLT response envelope is required. A 2xx response with an error in its JSON body still stops delivery retries; use a non-2xx status when processing has not been accepted.
If your endpoint cannot be reached, times out or returns a non-2xx response, DLT retries the notification. By default, DLT allows 5 seconds to connect, 15 seconds for the request and up to 8 delivery attempts in total. Retry delays start at 30 seconds and double, up to one hour; actual arrival times depend on DLT's delivery schedule. Confirm the settings for your integration with DLT. If delivery still fails after the final attempt, contact DLT to arrange recovery.
Retries retain the same event ID and payload, with a new delivery timestamp and signature for each attempt. Accept duplicates safely and do not assume arrival order. Browser navigation is not payment proof; use verified notifications and saved transaction status to reconcile your order.