Public Encryption Key

In this section you will learn how to process a Public Encryption Key message

Public Encryption Key Overview

A Public Api Encryption message enables a merchant to request a public Encryption key used to encrypt card holders payment details client side before submitting the secure payload to the Single Use Token service for payment processing.

342

How to process a Public Encryption Key request message

The merchant's system sends a HTTP GET Public Encryption Key request message to the ANYpay Gateway. Sections Public Key describes the elements required to build a Public Key request message.

📘

Key elements for a Public Encryption Key request message

Type MUST be set to [Encryption]

Examples of a Public Encryption Key request message can be seen below.

https://api-integration.pxp-solutions.net/PublicKeyService/api/v5/PublicKeys?type=Encryption&merchantId=BDD

Handling a Public Encryption Key response message

An example of a Public Encryption Key response message can be seen below.

{
  "state": "Success",
  "id": "18d88ffb-b872-442f-b299-d41457f3900d",
  "expiresAt": "2018-02-16T16:08:16.474811+00:00",
  "publicEncryptionKey": {
    "rsa": {
      "modules": "uH2Dsx0Mdw0XNjMs7OVxmhygYzCojFb8v/Vpi9dCjtdzOH4Rxm+/uYE5Bl7DRiK/WiL8nxnUoEiz15oHELThdj9pnsH6wHbrNu8eJELBGV7nsnA+gik7bmKtVeH6+hZlVXqmQisnpj4Dq80xQTfxCz6Ue1NGJvs64Oi2+VDF9WQj0Lju6sB5GBf05VlJiw0o0SG8g1Qe/QPX1SPmlznmetiXyzjYXpAqPihKG+RxgaVxA97APdyyGhBUyQxomhO3osIjS9lXA/lsm/WEP+ebzAzUdnPTixGbmRV6kujNCDdBTfbkYOcXrc4xA95dExTD099bC4P56RSkHBZ8xR6qQw==",
      "exponent": "AQAB"
    }
  }
}