logo
Trustly Docs
BETA

Signature tester

Use the signature tester to learn how signature works
Updated 2 months ago

The signature tester is used to show you how a signature is generated.

A signature is used to sign all messages to secure the communication between Trustly and your system. It is a Base64 encoding of a RSA key pair.

Learn more about authentication with signature.

Use signature tester and learn how it is generated by encoding a RSA key pair and a JSON data object.

1. Open the signature tester.

2. In the tester, keep the default JSON data object or paste new one in the JSON-data field, and click Show serialisation result.

Example of JSON data object
"Data": {
      "Username": "merchant_username",
      "Password": "merchant_password",
      "NotificationURL": "https://URL_to_your_notification_service/dajskldjakls123",
      "EndUserID": "12345",
      "MessageID": "your_unique_deposit_id",
      "Attributes": {
        "Country": "SE",
        "Locale": "sv_SE",
        "Currency": "SEK",
        "Amount": "103.00",
        "IP": "123.123.123.123",
        "MobilePhone": "+46709876543",
        "Firstname": "John",
        "Lastname": "Doe",
        "Email": "test@trustly.com",
        "NationalIdentificationNumber": "790131-1234",
        "SuccessURL": "https://yourpage.com/success",
        "FailURL": "https://yourpage.com/fail"
      }


Result: The serialised result will be added to the Serialised data field.

3. Under the Serialised data field, keep the default API method and UUID, and click Show Signed result.

4. In the Result field, check the string in Plaintext and Signature:

  • Plaintext: a string concatenated by UUID and serialized JSON data object.


Concatenated string example
Deposit258a2184-2842-b485-25ca-293525152425AttributesCurrencySEKFirstnameJohnIP123.123.123.123LastnameDoeLocalesv_SEMobilePhone+46709876543NationalIdentificationNumber790131-1234EndUserID12345MessageIDyour_unique_deposit_idNotificationURLURL_to_your_notification_servicePasswordmerchant_passwordUsernamemerchant_username


  • Signature: a RSY encrypted key


Signature example
UXh7ZdkrG4cLo0lyhF3nm+UPo/ZCM+JuUmZq6Zr4W7oygQVeWEK/Hi2Y0sjH8/aE7g39beGtFPw0IugWhETwaT/zj7GIfey4GsbKjUP4O3NZup0v1g1KS9obpl1nDvpfdmKhN1kUvLyQso5/77xErDTlkvlITiaWmN4XquHPX2RtV33tRuDWKgy51wot1K3IHUUl4Ws9cL66XagSmKanypR2Q5x7cTJmu0K3FSWYOfxl7V/PkMGN+9Optcsjr8w4r1Q5CCnfo9B0NbM9QMXPTD8VUHP/dwCS+yV9ErOcDOITFof7XvYa8/cY5JiwC3KhGQWD2wiv/KqDxNqKbCrokQ==