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

Available Webhooks

WEBHOOK SUBSCRIPTIONS ARE LIMITED TO 5 PER PJMID. But a single Webhook can simultaneous track multiple requestI IDs.

For more information on PayJunction account structures, see the PayJunction Account Structures guide.

Available Webhooks

Webhooks can be subscribed to via the PayJunction REST API. The following webhooks are all currently available:

  • CUSTOMER
  • DEPOSIT
  • SETTLEMENT
  • SMARTTERMINAL_REQUEST
  • TRANSACTION
  • TRANSACTION_SIGNATURE

Webhooks, like all parts of the API, are tied to the PJMID for an account in PayJunction. If a merchant processes through two different PJMIDs your service will have to subscribe to webhook events for both accounts to receive all data. Multiple webhook subscriptions can be posted to PayJunction for each account and type of webhook if needed.

CUSTOMER

This webhook is triggered when a new customer is created. See the Customers API for more information on deposits.

Example CUSTOMER Webhook Payload

{
  "id" : "e2f706cf-1538-4d04-9fdc-61609013XXXX",
  "created" : "2024-09-06T19:54:04.563Z",
  "type" : "CUSTOMER",
  "data" : {
    "customerId" : 209
  }
}

DEPOSIT

This webhook is triggered when a new deposit is available. See the Deposits API for more information on deposits.

Example DEPOSIT Webhook Payload

{
"id" : "481a50b6-4f64-4a39-abc0-28d0dda90a14",
"created" : "2024-06-04T20:51:23.895Z",
"type" : "DEPOSIT",
"data" : {
"depositId" : "54bd48da-450b-4566-bc71-4809fccd3d3c"
}
}

SETTLEMENT

This webhook is triggered when a terminal is settled. See the Setlements API for more information on settlements. A transaction search can be done using the returned settlementId to get a list of transactions that were settled.

Example SETTLEMENT Webhook Payload

{
"id" : "92f947cc-a571-4891-9046-0a409cea0f4e",
"created" : "2024-05-30T14:25:34.241Z",
"type" : "SETTLEMENT",
"data" : {
"settlementId" : 8425
}
}

SMARTTERMINAL_REQUEST

This webhook is triggered any time a transaction changes state as it is processed via the Smart Terminal, regardless of whether the transaction was initiated via the PayJunction REST API or another service, such as our Virtual Terminal web interface.

For examples and details please see the SMARTTERMINAL_REQUEST Webhook page.

TRANSACTION

This webhook is triggered any time that a transaction is processed through a PayJunction account, regardless of which PayJunction service the transaction was initiated through, such as our Virtual Terminal, Smart Terminal, or Hosted Payments secure hosted checkout service.

Example TRANSACTION Webhook Payload

{
  "id" : "2bc89720-2c25-4765-93cf-b695bd3801da",
  "created" : "2020-03-05T17:52:10.557Z",
  "type" : "TRANSACTION",
  "data" : {
    "transactionId" : 10157
  }
} 

For more details please see the TRANSACTION Webhook page.

TRANSACTION_SIGNATURE

This webhook is triggered any time that a transaction is signed on a PayJunction account. As with the SMARTTERMINAL_REQUEST webhook, this is sent regardless of whether the transaction was initiated via the PayJunction REST API or another service, such as our Virtual Terminal web interface.

Example TRANSACTION_SIGNATURE Webhook Payload

{ "id": "a7b7f967-d519-4b4c-a5b8-e97347966993", "created": "2016-12-05T18:18:58.674Z", "type": "TRANSACTION_SIGNATURE", "data": { "transactionId": "137" } }

Important Considerations

WEBHOOK SUBSCRIPTIONS ARE LIMITED TO 5 PER PJMID. But a single Webhook can simultaneous track multiple requestI IDs.
For more information on PayJunction account structures, see the PayJunction Account Structures guide.

WEBHOOKS ARE SOURCE AGNOSTIC

As mentioned previously, webhooks are emitted regardless of the source that initiated the transaction or event. If you are only interested in processing webhooks for transactions initiated by your software or service, you will need to keep track of the requestPaymentId value. You'll then match this value with the same parameter returned in the SMARTTERMINAL_REQUEST data payload and drop any requests with unrecognized requestPaymentId values.

TRANSACTION and TRANSACTION_SIGNATURE webhooks can be referenced by the transactionId and Pj-Merchant and Pj-Account Header values. See Webhook HTTP Pj-Headers

RESPOND TO A WEBHOOK WITH A SUCCESSFUL HTTP STATUS CODE

If the response from the listening service is not received in a timely manner, you may receive the same webhook notice more than once. It is important to consider this when building your listening service and databases.

Our webhook infrastructure guarantees "at least once delivery" which optimizes fault-tolerance, and scalability to deal with all kinds of failures throughout the Internet and in our client's networks but imposes a small burden on our clients to be ready to accept duplicate webhooks from time to time even if they respond with HTTP 200.

Click here to learn more about Receiving Webhooks.