Test vectors

Validate request signing (ES256 and PS256) and webhook HMAC offline, without a credential.

The values below are generated and verified by the same code that validates in production (internal/reqsign). If your implementation reproduces these signatures, it will pass at the gateway.

Test RSA key

The PS256 private key published here exists only so you can reproduce the vector. It was never registered on any credential; do not use it for anything else.

Request signature

Both algorithms sign the same canonical string (LF between lines, no trailing newline):

POST
/v1/accounts/acc-123/pix/payments
1789412400
4f1e3b7a-9d2c-4a11-8f55-2b0c6a7d1e90
612612d208fb618eb2b007d2a7f8d7a1cfb511532389298f1cc33322c3094bcc
FieldValue
methodPOST
path?query/v1/accounts/acc-123/pix/payments
X-Request-Timestamp1789412400
Idempotency-Key4f1e3b7a-9d2c-4a11-8f55-2b0c6a7d1e90
body{"amount":1000}
X-Content-SHA256612612d208fb618eb2b007d2a7f8d7a1cfb511532389298f1cc33322c3094bcc
FieldValue
kidcfe8291443215153e11b76a7a533dd3c
jti00000000-0000-4000-8000-000000000001

Public key (SPKI PEM)

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6VuQL7n18jc/8dHENPXeHZrdCVPu
q2j496awbvsDhxWTVj3hBScPI9MioPmlfS9nNUo9MJhTDNMfVRUALXXrfg==
-----END PUBLIC KEY-----

Detached JWS (X-Request-Signature)

eyJhbGciOiJFUzI1NiIsImtpZCI6ImNmZTgyOTE0NDMyMTUxNTNlMTFiNzZhN2E1MzNkZDNjIiwianRpIjoiMDAwMDAwMDAtMDAwMC00MDAwLTgwMDAtMDAwMDAwMDAwMDAxIn0..hN37T9veyWLyXnEvXqnPwFIsD1GzgKfoY_bHzkc3rx3-MZCNhVaIVq1W_P77g8Dfw6IJ09wBddu6bhNQkGulvQ

The ES256 signature is 64 bytes (R||S, ieee-p1363). DER does not verify.

Webhook HMAC signature

With authType: HMAC, every delivery carries X-Signature = base64(HMAC_SHA256(secret, raw_body)). Compute it over the exact bytes received — never over re-serialised JSON.

FieldValue
secretwhsec_test_0123456789abcdef0123456789abcdef
X-SignatureJNDRKgQ0ApKBavDOoLYfNnQHhFXUN6RhEspaqKf5fX8=

Raw body

{"id":"pix-in-E0000000020251229211433912","type":"pix.in.completed","occurredAt":"2025-12-29T21:14:33.912Z","schemaVersion":"1.0","environment":"sandbox","tenantId":"tenant-acme","accountId":"acc_123456","data":{"transactionId":"2ee948cb-4e03-43d1-b202-b7fb31d5b016","endToEnd":"E0000000020251229211433912","amount":150.5,"status":"SUCCESS"}}