---
updatedAt: 2025-11-12T23:50:54.000Z
agentTools:
  projectIndex: https://developer.pxp-solutions.com/llms.txt
---

# Public Key Request

This Service is used to obtain Public Keys from PXP.
This request type can be used to obtain one of the following Public Keys:

API Key - This is used to authenticate with the Single Use Token Service
Encryption Key - This is used for browser side card data encryption.

When using the API Key for Card Data Encryption you must use .NET v4 or later.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "public-key-service",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-integration.pxp-solutions.net/PublicKeyService"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v5/PublicKeys?merchantId={merchantId}&type={type}": {
      "get": {
        "summary": "Public Key Request",
        "description": "This Service is used to obtain Public Keys from PXP.\nThis request type can be used to obtain one of the following Public Keys:\n\nAPI Key - This is used to authenticate with the Single Use Token Service\nEncryption Key - This is used for browser side card data encryption.\n\nWhen using the API Key for Card Data Encryption you must use .NET v4 or later.",
        "operationId": "public-key",
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "description": "[Length=3] This identifies the customer to PXP",
            "schema": {
              "type": "string",
              "default": "BDD"
            },
            "required": true
          },
          {
            "name": "type",
            "in": "path",
            "description": "This is the type of key being requested. [Api or Encryption]",
            "schema": {
              "type": "string",
              "default": "Api"
            },
            "required": true
          },
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "Basic QkREVGVzdDpCRERUZXN0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Public API Key Response": {
                    "value": "{\n  \"state\": \"Success\",\n  \"id\": \"d8e7496d-30be-4db8-9d29-1fcd16766bcb\",\n  \"expiresAt\": \"2018-02-16T16:10:05.6319253+00:00\",\n  \"publicApiKey\": \"c44c4765-d4bd-4bcb-bc6f-5ff05e1dfa7d\"\n}"
                  },
                  "Public Encryption Key Response": {
                    "value": "{\n  \"state\": \"Success\",\n  \"id\": \"18d88ffb-b872-442f-b299-d41457f3900d\",\n  \"expiresAt\": \"2018-02-16T16:08:16.474811+00:00\",\n  \"publicEncryptionKey\": {\n    \"rsa\": {\n      \"modules\": \"uH2Dsx0Mdw0XNjMs7OVxmhygYzCojFb8v/Vpi9dCjtdzOH4Rxm+/uYE5Bl7DRiK/WiL8nxnUoEiz15oHELThdj9pnsH6wHbrNu8eJELBGV7nsnA+gik7bmKtVeH6+hZlVXqmQisnpj4Dq80xQTfxCz6Ue1NGJvs64Oi2+VDF9WQj0Lju6sB5GBf05VlJiw0o0SG8g1Qe/QPX1SPmlznmetiXyzjYXpAqPihKG+RxgaVxA97APdyyGhBUyQxomhO3osIjS9lXA/lsm/WEP+ebzAzUdnPTixGbmRV6kujNCDdBTfbkYOcXrc4xA95dExTD099bC4P56RSkHBZ8xR6qQw==\",\n      \"exponent\": \"AQAB\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Public API Key Response",
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "example": "Success"
                        },
                        "id": {
                          "type": "string",
                          "example": "d8e7496d-30be-4db8-9d29-1fcd16766bcb"
                        },
                        "expiresAt": {
                          "type": "string",
                          "example": "2018-02-16T16:10:05.6319253+00:00"
                        },
                        "publicApiKey": {
                          "type": "string",
                          "example": "c44c4765-d4bd-4bcb-bc6f-5ff05e1dfa7d"
                        }
                      }
                    },
                    {
                      "title": "Public Encryption Key Response",
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "example": "Success"
                        },
                        "id": {
                          "type": "string",
                          "example": "18d88ffb-b872-442f-b299-d41457f3900d"
                        },
                        "expiresAt": {
                          "type": "string",
                          "example": "2018-02-16T16:08:16.474811+00:00"
                        },
                        "publicEncryptionKey": {
                          "type": "object",
                          "properties": {
                            "rsa": {
                              "type": "object",
                              "properties": {
                                "modules": {
                                  "type": "string",
                                  "example": "uH2Dsx0Mdw0XNjMs7OVxmhygYzCojFb8v/Vpi9dCjtdzOH4Rxm+/uYE5Bl7DRiK/WiL8nxnUoEiz15oHELThdj9pnsH6wHbrNu8eJELBGV7nsnA+gik7bmKtVeH6+hZlVXqmQisnpj4Dq80xQTfxCz6Ue1NGJvs64Oi2+VDF9WQj0Lju6sB5GBf05VlJiw0o0SG8g1Qe/QPX1SPmlznmetiXyzjYXpAqPihKG+RxgaVxA97APdyyGhBUyQxomhO3osIjS9lXA/lsm/WEP+ebzAzUdnPTixGbmRV6kujNCDdBTfbkYOcXrc4xA95dExTD099bC4P56RSkHBZ8xR6qQw=="
                                },
                                "exponent": {
                                  "type": "string",
                                  "example": "AQAB"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "412": {
            "description": "412",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": \"4011930\",\n  \"details\": {\n    \"message\": \"Merchant id is invalid\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "4011930"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Merchant id is invalid"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Authorization",
        "value": "Basic QkREVGVzdDpCRERUZXN0"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```