In most situations, a single publishable key per application or website is all you need. We recommend generating one key per environment (e.g., one for Production and one for Test).
Do not create a new publishable key for every session or customer visit. Publishable keys are meant to be reused and loaded safely in the client’s browser as part of your integration. Creating excessive keys (e.g., per customer or per session) may cause performance issues or exceed your key limit.
Each PayJunction account (PJMID) is limited to 100 publishable keys.
Create a new publishable key for JavaScript Tokenization. Each publishable key is unique to a merchant, and different between Test and Production environments.
Example Request
curl -X POST https://api.payjunction.com/publishablekeys \
-u "login:password" \
-H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY"
Example Response
{
"keyValue" : "key_lBS6jSeRfXZ5e7BRfS0bA4QEWvzCIXTN9klugQNT7ywPvc1LYFTabGWgxEQxXjTsZpyhdHvCNDKPGI0wk74J3Q",
"created" : "2021-12-09T15:47:53Z"
}