Skip to content

Test your payslips in sandbox

In sandbox, you can verify the payslips that your organisation registered. Verifiabl does not charge for these tests.

Before you use the API, you can test a payslip in Verifiabl:

  1. Sign in to Verifiabl at https://manage.sandbox.verifiabl.io.
  2. Open Test verify.
  3. Choose the payslip PDF or image, or paste its scan link.

Verifiabl shows the verified payslip data. If the test fails, it shows the cause.

Use the API in your integration tests. This operation is not available in production.

For the HTTP contract, refer to POST /v1/issuer-test/verifications/payload.

  • API: https://verify.sandbox.verifiabl.io
  • Token: https://auth.sandbox.verifiabl.io/oauth/token

Use the client ID and client secret of your sandbox Issuer API client. Set audience to the sandbox Verifier API URL. Set scope to verifiabl:issuer-test.

POST /oauth/token
POST https://auth.sandbox.verifiabl.io/oauth/token
Content-Type: application/json
{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"audience": "https://verify.sandbox.verifiabl.io",
"scope": "verifiabl:issuer-test"
}

This token is for test requests only. To register payslips, use a token for the Issuer API.

If the token request returns an error, ask Verifiabl to enable test requests for your sandbox client.

Register a payslip in sandbox. Then read its payload from the QR code or the PDF metadata. The verifier guide shows how to read the payload.

Send the payload without changes in barcode:

POST /v1/issuer-test/verifications/payload
POST https://verify.sandbox.verifiabl.io/v1/issuer-test/verifications/payload
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"barcode": "YOUR_PAYLOAD"
}
Status code Result
200 The payload is verified. The response contains the payslip data and the employee details that your organisation registered.
400 VALIDATION_FAILED The request body is not in the correct format. Use the path of each item in field_errors to find the request field.
401 UNAUTHORIZED The token is missing, not valid or expired. Make sure that its audience is the sandbox Verifier API URL. Get a new token. Then send the request again.
403 FORBIDDEN If reason is issuer_mismatch, another organisation registered the payslip. If there is no reason, the token is not valid for this operation. Get a token for your sandbox Issuer API client with only the verifiabl:issuer-test scope.
404 NOT_FOUND This operation is not available at this URL. Send the request to the sandbox API URL.
422 NOT_VERIFIED The payload could not be verified. Use reason to find the cause.
429 RATE_LIMITED Your organisation sent too many test requests. Wait for the number of seconds in the Retry-After header. Then send the request again.
500, 503 INTERNAL_ERROR, SERVICE_UNAVAILABLE A temporary problem. Send the request again later. Use exponential backoff.

In sandbox, a 422 NOT_VERIFIED response contains reason:

reason Cause
barcode_length The text in barcode is empty or longer than 13,000 characters. Send the full payload or scan URL one time.
scan_url_not_allowed The scan URL does not start with https:// or is not on verifiabl.io. Send the scan URL from the QR code without changes.
missing_ciphertext_fragment The scan URL has no text after the # character. Send the full scan URL, including all of the text after the # character.
unsupported_barcode_version The version after the # character is not 1 or 2. Make the QR code with a current issuer SDK.
invalid_reference The Verifiabl reference in the payload is not 22 base64url characters.
invalid_ciphertext The encrypted PII in the payload is not base64url. In a version 2 payload, it is not uppercase base32 without padding.
unreadable_barcode The text in barcode is not a Verifiabl barcode that can be read. Send the full payload or scan URL without changes.
reference_not_found Verifiabl has no record of this payslip in sandbox.
key_unavailable Your organisation has no active sandbox key. Make a new key on the Encryption keys page in Verifiabl. Then register new payslips with the new key.
no_key_matched None of your organisation’s active keys decrypts the payload. Encrypt the PII with your current sandbox key.
invalid_utf8 The decrypted PII is not valid UTF-8.
profile_schema_mismatch The PII format does not agree with the schema of the registered payslip.
Other values The decrypted PII does not follow the PII format. The value identifies the rule.

Use code and reason in conditional statements. Refer to Error responses.