PAYOK Signature Generator plugin for Yaak HTTP Client
Yaak plugin to generate PAYOK RSA-SHA256 digital signatures directly inside your requests.
payok.signatureGenerates the sign header value. The plugin reads the request body automatically — no need to copy it into the arguments.
Setup:
signpayok and select payok.signature from autocomplete/api-pay/payment/V3.2/order/create-apipayok.timestampGenerates the current ISO8601 timestamp (e.g. 2024-01-15T10:30:00.123Z).
In the request body, place your cursor inside the requestTime value and select payok.timestamp from the template tag autocomplete.
{ "requestTime": "${[ payok.timestamp() ]}" }
payok.uuidGenerates a UUID for fields like merchantOrderId that must be unique per request.
{ "merchantOrderId": "${[ payok.uuid() ]}" }
payok.signature expires both caches before rendering the body. This guarantees:
payok.signature renders
→ expires UUID + timestamp caches
→ renders body → payok.uuid() and payok.timestamp() generate fresh values and cache them
→ signs body with those values
Yaak sends actual request
→ renders body → payok.uuid() and payok.timestamp() return cached values ✓
Both formats are accepted:
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSj...
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSj...
-----END PRIVATE KEY-----
If your key starts with
-----BEGIN RSA PRIVATE KEY-----(PKCS#1), convert it first:openssl pkcs8 -topk8 -nocrypt -in rsa_private.pem -out pkcs8_private.pem
message = <request_body_string> + "&" + <endpoint_path>
signature = Base64( RSA-SHA256-sign(privateKey, message) )