Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

All server-to-server requests to Svea Payments API are authenticated with standard Basic Authentication Header. Use merchant's seller id as the username and secret key as the password.

Authentication: Basic <base64-encoded credentials>

Example in Java:

Code Block
languagejava
String username = "sellerid";
String password = "secretkey";
String base64UserPass = java.util.Base64.getEncoder().encodeToString((username + ":" + password).getBytes(Charset.forName("UTF-8")));
URL url = new URL("https://test1.maksuturva.fi/NewPaymentExtended.pmt");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Authorization", "Basic " + base64UserPass);
System.out.println("Basic " + base64UserPass);

output:
Basic c2VsbGVyaWQ6c2VjcmV0a2V5