Follow

Application Keys

In order to more quickly troubleshoot and support developers, all requests to the PayJunction API must include an Application Key. This key is used to identify your application with the PayJunction API. Each integration and/or application that uses the PayJunction API must have an unique Application Key.

Requesting an Application Key

  1. Click Request Key in the menu above to submit a request for an Application Key
  2. After your request has been received, we will send you both a Development (Testing) Application Key and a Production (Live) Application Key.

How to Include an Application Key in an API Request

HTTP libraries generally have built-in support for passing HTTP Headers with your request. The following header must be included in all HTTP requests:

X-PJ-Application-Key: YOUR_APP_KEY

If the application key is incorrect or inactive, the 401 Unauthorized HTTP Status Code is returned.

For an example curl request try running a transaction on our test server:

Sandbox Request

curl -X POST -u "pj-ql-01:pj-ql-01p" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_LABS_APP_KEY" \
	-d "action=CHARGE" \
	 -d "cardNumber=4444333322221111" \
	-d "cardExpMonth=01" \
	-d "cardExpYear=2020" \
	-d "amountBase=3.00" \
	-d "cardCvv=999" \
	"https://api.payjunctionlabs.com/transactions"

Production Request

curl -X POST -u "apiLogin:apiPassword" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
	-d "action=CHARGE" \
	-d "cardNumber=4444333322221111" \
	-d "cardExpMonth=01" \
	-d "cardExpYear=2020" \
	-d "amountBase=3.00" \
	-d "cardCvv=999" \
	"https://api.payjunction.com/transactions"