PAYMENTS
SIMPLIFIED


Offer all the payment features your
customers want with a fast integration
that limits your PCI scope.

GET STARTED

API Base URLs

  • Production Server

    For processing live transactions

    https://api.payjunction.com

  • Test Server

    For development

    https://api.payjunctionlabs.com

Most Commonly Referred to Articles

Quick Start to Transactions

Overview of transaction types and terms.

Quick Start to Transactions

The PayJunction REST Api is a single service that allows you to:

  1. Process Credit Cards.
  2. Process ACH Electronic Check Transactions.

There are two actions that you can perform on an account:

  1. CHARGE
  2. REFUND

The ACH term for a charge is “debit”, and the term for refund is “credit”. To simplify our API we use the terms charge & refund for both credit cards and ACH. In this documentation we will only refer to charges and refunds.

When a transaction is processed it is added to a batch. A batch is a collection of transactions that are closed out at the end of the day. The total amount of the batch is what will be deposited to the business bank account. Accounts are set to automatically batch transaction at 8PM every night. You don’t need to worry about managing the batch process. We take care of it for you.

Now that we have covered actions let talk about the transaction status. There are three statuses that a transaction can be in:

  1. CAPTURE
  2. VOID
  3. HOLD

CAPTURE – This is the default status of a transaction. If you don’t specify a statues then it will be automatically set to capture. Capture indicates that the transaction will be settled when the next batch is run. After a transaction has been settled in a batch you can no longer updated the status.

VOID – This will cancel the charge so it does not settle in the batch. This is different then a refund. A void simply does not settle the transaction. For credit cards, a reversal is run on the initial authorization so the funds are released back to the card holder. This process can take between 1-7 business days. For an Ach, there is no authorization so the transaction is just not settled. The transaction will be removed when the batch is run. There is no effect on the customer’s bank account when an Ach is voided.

HOLD – This will leave the transaction in the unsettled batch. When the batch closes this transaction will remain in the new unsettled batch. If a credit card is put on hold then a pending transaction will remain on the customer’s account until you either update the status to capture or void. This is used if you want to verify funds are available on the customer’s card first but you are not ready to capture the funds. For an ACH, the transaction is not settled, but the transaction remains in the unsettled batch.

Let’s walk through the most common uses:

Charging a Card & Capturing

The default action is CHARGE, and the default status is CAPTURE. So here is a simple request to to charge and capture a card.

Production Request

curl -X POST -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=1.00" \
    "https://api.payjunction.com/transactions"

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 "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=1.00" \
    "https://api.payjunctionlabs.com/transactions"

Refunding a Card & Capturing

All we need to do is update the action. The status will default to CAPTURE

Production Request

curl -X POST -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "action=REFUND" \
    -d "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=1.00" \
    "https://api.payjunction.com/transactions"

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=REFUND" \
    -d "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=1.00" \
    "https://api.payjunctionlabs.com/transactions"

Authorizing a Credit Card – Not Capturing a Batch

This will check that funds are available on the card, but the transaction will not be settled.

Production Request

curl -X POST -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "status=HOLD" \
    -d "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=2.00" \
    "https://api.payjunction.com/transactions"

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 "status=HOLD" \
    -d "cardNumber=4444333322221111" \
    -d "cardExpMonth=01" \
    -d "cardExpYear=2020" \
    -d "amountBase=2.00" \
    "https://api.payjunctionlabs.com/transactions"

Charging (Debiting) a Checking Account

Again, the default action is CHARGE, and the default status is CAPTURE, so there is no need to specify.

Production Request

curl -X POST -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "achRoutingNumber=104000016" \
    -d "achAccountNumber=12345678" \
    -d "achAccountType=CHECKING" \
    -d "achType=PPD" \
    -d "amountBase=1.00" \
    "https://api.payjunction.com/transactions"

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 "achRoutingNumber=104000016" \
    -d "achAccountNumber=12345678" \
    -d "achAccountType=CHECKING" \
    -d "achType=PPD" \
    -d "amountBase=1.00" \
    "https://api.payjunctionlabs.com/transactions"

Refunding (Crediting) a Checking Account

The default status is CAPTURE, so there is no need to specify.

Production Request

curl -X POST -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "action=REFUND" \
    -d "achRoutingNumber=104000016" \
    -d "achAccountNumber=12345678" \
    -d "achAccountType=CHECKING" \
    -d "achType=PPD" \
    -d "amountBase=1.00" \
    "https://api.payjunction.com/transactions"

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=REFUND" \
    -d "achRoutingNumber=104000016" \
    -d "achAccountNumber=12345678" \
    -d "achAccountType=CHECKING" \
    -d "achType=PPD" \
    -d "amountBase=1.00" \
    "https://api.payjunctionlabs.com/transactions"

Voiding a Transaction After It Has Been Run

The transaction id is put in the URI and the method is update to PUT.

Production Request

curl -X PUT -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "status=VOID" \
    "https://api.payjunction.com/transactions/12345" 

Sandbox Request

curl -X PUT -u "pj-ql-01:pj-ql-01p" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_LABS_APP_KEY" \
    -d "status=VOID" \
    "https://api.payjunctionlabs.com/transactions/12345"

Holding a Transaction After It Has Been Run

The transaction id is put in the URI and the method is update to PUT.

Production Request

curl -X PUT -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "status=HOLD" \
    "https://api.payjunction.com/transactions/12345"

Sandbox Request

curl -X PUT -u "pj-ql-01:pj-ql-01p" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_LABS_APP_KEY" \
    -d "status=HOLD" \
    "https://api.payjunctionlabs.com/transactions/12345"

Capturing a Transaction & Editing Amount After It Has Been Run

The transaction id is put in the URI and the method is update to PUT.

Production Request

curl -X PUT -u "login:password" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
    -d "status=CAPTURE" \
    -d "amountBase=100.00" \
    -d "amountShipping=15.00" \
    "https://api.payjunction.com/transactions/12345"

Sandbox Request

curl -X PUT -u "pj-ql-01:pj-ql-01p" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_LABS_APP_KEY" \
    -d "status=CAPTURE" \
    -d "amountBase=100.00" \
    -d "amountShipping=15.00" \
    "https://api.payjunctionlabs.com/transactions/12345"

This is a brief overview of some of the common uses of the API. It does much more!