# How do I verify that a payment callback really came from the payment provider?

Source: https://www.payjn.com/help/verify-payment-callback/ · Updated 2026-11-20 · PAYJN Help center

Verify a callback using the authentication procedure in the approved integration documentation before trusting its contents. Then match it to your own order, including reference, amount, currency and documented confirmation state. A familiar sender name or customer screenshot is insufficient.

## Prepare the verification boundary

Keep verification on your server and store credentials securely. Confirm the exact signature procedure, credential scope, request representation and replay checks from the approved documentation; this article does not specify PAYJN algorithms, headers or fields.

- Preserve original request bytes if the verification procedure requires them.
- Use credentials assigned to the relevant merchant setup.
- Apply documented timestamp and replay protections where specified.
- Keep credentials and unnecessary personal data out of logs.

Parsing and reserializing a message can change what a signature covers. Make sure middleware does not discard data required for verification before your handler receives it.

## Authenticate first, match second

1. Validate the message using the documented procedure.
2. Resolve the merchant order from your records.
3. Match merchant context, provider reference, amount and currency.
4. Check that the result permits the proposed business action.
5. Persist the verified event and protect processing against duplicates.

A valid signature authenticates the message under the agreed procedure; it does not make an unexpected amount correct. Retain mismatches for investigation without automatically fulfilling the order or replacing the expected amount.

Follow documented acknowledgement rules after durable handling. If storage fails, use the prescribed failure response so an event is not treated as safely received when it could be lost.

## Test failures and recovery

Use your PAYJN account's test mode before launch: there is no separate sandbox to build, and PAYJN operations can switch the account between test and live mode for you. Include altered payloads, incorrect credentials, documented replay cases, concurrent deliveries and crashes between storage and processing.

The [duplicate webhook guide](https://www.payjn.com/guides/payment-webhook-duplicate-events/) connects verification with safe crediting. [Contact PAYJN](https://www.payjn.com/contact/) for the approved verification and acknowledgement contract.

## FAQ

### Is a secret callback URL enough?

No. Knowing a destination URL does not prove who sent a request; use documented authentication.

### Can I trust a message because its reference exists?

No. References support matching, but are not authentication credentials.

### Should an authentic but mismatched payment fulfil an order?

No. Record the discrepancy and resolve it through the agreed exception process.
