Help centre / Rewards and postbacks
The signature check on my server fails
Nearly always the wrong key or a changed value. Use the secret key of the right mode and the values exactly as they arrived.
Go through these in order.
- The secret key, not the public one. It starts with
yp_test_sk_oryp_live_sk_. - The key of the right mode. Sandbox messages, and the test buttons while your dashboard is on Sandbox, are signed with the sandbox key. Live messages are signed with the live key.
- The values exactly as they arrived. Do not round the reward and do not trim or re-format anything before you check.
10.50and10.5are different texts. - The right order, joined with colons: user id, transaction id, reward, status.
- Lower case. The signature is written in lowercase letters and digits. Compare it as text.
- A replaced key. When you replace a secret key, the old one stops working at once. Your server needs the new one.
Trying again
Send a test completion on the app page sends a signed message as often as you like. The postback log shows the exact address we called, so you can compare it with what your code received.
The formula and sample code are in Postbacks.