app_secret as the key. The hash_key is a 64-character hexadecimal signature. The signed fields travel in the request, response, redirect, or webhook payload. Generate and verify signatures on your server, where you store your app_secret.hash_key description.| in that order. Keep an empty position for a signed field that the endpoint allows to be empty. Use | only as the separator.app_secret, and put the hexadecimal result in the request’s hash_key field.100.00 and 100 produce different signatures. Follow the endpoint’s JSON type. If it accepts a string for the amount, a string can preserve trailing zeros. For Cashout to Bank, format the sum of all row amounts with two decimal places and sign the first row’s other values as sent.paySmart2Dtotal, installments_number, currency_code, merchant_key, invoice_id. With the example secret example_app_secret, the message is 100|1|TRY|merchant_example|20260001. This excerpt shows the signed request fields and hash_key. The JSON sends total, installments_number, and invoice_id as integers. The code examples pass their text representations to the signing function.[
{
"total": 100,
"installments_number": 1,
"currency_code": "TRY",
"merchant_key": "merchant_example",
"invoice_id": 20260001,
"hash_key": "2c7f66fa4f0c16a413af7c639af9971c469a7a1f13ee98b8f010e83182cd9f85"
}
]hash_key contains exactly 64 hexadecimal characters.| and compute HMAC-SHA256 using your merchant app_secret. Compare the computed and received signatures with a constant-time comparison.null field and keep its position. Join any embedded | in a signed free-text response field as received. The code examples take string values in the documented order and accept null for an empty verification field.| Message | Format | Signed fields, in order |
|---|---|---|
| 2D response / 3D redirect | 2D: JSON; 3D: query string or POST form | payment_status, total, invoice_id, order_id, currency_code |
| Sale webhook | POST form | status, total, invoice_id, order_id, currency_code |
| Refund webhook | POST form | status, amount, invoice_id, order_id |
| Manual refund webhook | POST form | status, refund_amount, invoice_id, empty value (the message ends with a pipe) |
| Recurring webhook | POST form | status, product_price, invoice_id, order_id, currency_code |
| Chargeback webhook | POST JSON | previous_trx_status, current_trx_status, invoice_id, order_id, amount, currency |
| Reverse webhook | POST JSON | Every field of the payload except hash_key, in payload order (see the field orders in Webhook) |
| Sub-merchant PF webhook | POST form | merchant_id, pf_id |
status is Completed or Failed; recurring webhook status is Completed or Failed; refund webhook status is Completed, or Refund Rejected when the refund is rejected; 2D/3D payment_status is 1 or 0.total and currency_code. The paySmart2D endpoint response examples use example_app_secret. See Webhook for payloads and transaction-specific reverse field orders.1|100.00|INV-DOCS-001|ORD-DOCS-001|TRY. With example_app_secret, the expected hash_key is 2cbe480fb9d6104c3eacf3cc5a479b04f68d3dee5021e9cf45a48018e375b2b4.total is the stored amount without trailing zeros, for example 100 or 150.5.Completed|100|INV-DOCS-001|ORD-DOCS-001|TRY. With example_app_secret, the signature in this payload excerpt verifies successfully.{
"status": "Completed",
"total": "100",
"invoice_id": "INV-DOCS-001",
"order_id": "ORD-DOCS-001",
"currency_code": "TRY",
"hash_key": "1eaea6c46ead8f3b2384c9df29f7d438327ee2574f8bf82822695b458822720d"
}hash_key you send. Exactly 64 hexadecimal characters (upper or lower case) is Hash v2; anything else is treated as Hash v1. There is no version field, so you can migrate one endpoint at a time.field|field|… text.| Message | Before the cutoff | After the cutoff |
|---|---|---|
2D payment response (paySmart2D, Non-3DS pay by card token) | Same version as your request's hash_key | v2 |
| 3D Secure return / cancel redirect | Same version as your request's hash_key | v2 |
| Signed error response or redirect for a rejected request | Same version as your request's hash_key | v2 |
| Sale webhook | Same version as the payment request's hash_key | v2 |
| Refund webhook, manual refund webhook | v1 | v2 |
| Recurring webhook | v1 | v2 |
| Chargeback webhook | v1 | v2 |
| Reverse webhook | v1 | v2 |
| Sub-merchant PF webhook | v1 | v2 |
| Purchase Link (hosted payment page): redirect and sale webhook | v1 | v2 |
| DPL (payment link) checkout: redirect and sale webhook | v1 | v2 |
| Wix payments | v1 | v2 |
status_code 68, "Invalid hash key". For 3D Secure this arrives on your cancel URL.status_code 90, "Invalid Hash key".hash_key Sipay sends is Hash v2.total and currency_code. Verify with the values in the message exactly as received; do not reformat amounts (800, 800.5 and 800.00 produce different signatures) and do not take total from your own order record.status, invoice_id, order_id, and hash_key in the redirect URL. The merchant must validate the hash_key value to verify the validity and source of the incoming request.POST request is sent to the merchant’s webhook URL for each renewal transaction. Since webhook URLs may also be publicly accessible, the source of incoming requests must be verified using hash_key.status parameter can have a value of 0 or 1.status parameter is Completed or Failed.status parameter is Completed or Refund Rejected.