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

SMARTTERMINAL_REQUEST Webhook

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.

Provides detailed status information for payment requests to the PayJunction Smart Terminal.

Transaction requests (/request-payment) will return the reference id as a requestPaymentId while all other requests such as signature capture (/request-signature) will return the reference id as a requestId. Regardless of the original request type, the SMARTTERMINAL_REQUEST webhook data object will always reference this id as the requestId.

Example Flow of Completed transaction

Connecting

Connection with the specified Smart Terminal is still pending

{
  "created": "2018-02-20T20:30:01.756Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab7ebb28",
    "status": "CONNECTING"
  },
  "id": "835a3fe6-a7e2-4872-9206-1ed28c4476e6",
  "type": "SMARTTERMINAL_REQUEST"
}

Busy Terminal

{
  "created": "2018-02-22T17:58:03.744Z",
  "data": {
    "requestId": "ca6a9797-3247-4f1e-9dcb-e053f31f8bb3",
    "status": "BUSY"
  },
  "id": "d50219c3-12f5-4bfe-98bd-d7cca3ac4e14a9",
  "type": "SMARTTERMINAL_REQUEST"
}

In Progress waiting for transactionId

Smart Terminal is performing the requested action.

{
  "created": "2018-02-20T20:30:02.436Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab44bb28",
    "status": "IN_PROGRESS"
  },
  "id": "c3a0e26f-87f7-46ef-9b0e-15ebbd7e3478",
  "type": "SMARTTERMINAL_REQUEST"
}

In Progress received a transactionId

Now that you have a transactionId, log it and call GET/transactions/{transactionId} to get the details.

  "created": "2018-02-20T20:30:07.935Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab7ebb28",
    "status": "IN_PROGRESS",
    "transactionId": 10082
  },
  "id": "762611cc-1636-434e-b137-8b148cf249a7",
  "type": "SMARTTERMINAL_REQUEST"
}

At this point you are just waiting for the COMPLETE to know when the Smart Terminal is available again. Post transaction activities such as a signature, email receipt or forgotten card could delay the COMPLETE status.

Transaction Completed

{
  "created": "2018-02-20T20:30:07.235Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab7ebb28",
    "status": "COMPLETE",
    "transactionId": 10082
  },
  "id": "762611cc-1636-434e-b137-8b148cf249a7",
  "type": "SMARTTERMINAL_REQUEST"
}

Example Flow of Canceled transaction

If the transaction is not processed (canceled, timeout, etc), transactionId field will not be present.

In Progress without transactionId

Smart Terminal is performing the requested action.

{
  "created": "2018-02-20T20:30:02.436Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab44bb28",
    "status": "IN_PROGRESS"
  },
  "id": "c3a0e26f-87f7-46ef-9b0e-15ebbd7e3478",
  "type": "SMARTTERMINAL_REQUEST"
}

Status COMPLETE without a transactionId can be treated as cancelled. 

{
  "created": "2018-02-20T20:30:03.567Z",
  "data": {
    "requestId": "a178db80-59e3-4e39-a6c7-bf8bab44bb28",
    "status": "COMPLETE"
  },
  "id": "c3a0e26f-87f7-46ef-9b0e-15ebbd7e3478",
  "type": "SMARTTERMINAL_REQUEST"
}

Example Flow of SmartTerminal Prompt (non-transaction request) 

Connecting

{
  "id" : "54e843ce-aaa4-479b-9e51-f6b15b0f3d3f",
  "created" : "2023-10-03T16:52:26.678Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "37fa5c74-6315-4838-a07c-4b73a600e729",
    "status" : "CONNECTING"
  }
}

In Progress (without promptButton)

{
  "id" : "e5a7400f-1ffa-4627-ae09-17f1098850e8",
  "created" : "2023-10-03T16:52:26.887Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "37fa5c74-6315-4838-a07c-4b73a600e729",
    "status" : "IN_PROGRESS"
  }
}

In Progress (with promptButton)

{
  "id" : "80cb8f64-89bb-4f61-bf7b-7c7307016600",
  "created" : "2023-10-03T16:54:19.034Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "37fa5c74-6315-4838-a07c-4b73a600e729",
    "promptButton" : "No",
    "status" : "IN_PROGRESS"
  }
}

Complete

{
  "id" : "870e9f82-4840-4da5-a109-a390df7eb6ab",
  "created" : "2023-10-03T16:54:21.435Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "37fa5c74-6315-4838-a07c-4b73a600e729",
    "promptButton" : "No",
    "status" : "COMPLETE"
  }
}

Notice that transaction requests will return a transactionId while Prompt Request requests return a promptButton.

Example Flow of SmartTerminal Signature Capture (non-transaction request)

Connecting

{
  "id" : "8188a444-2fdf-4e5f-9cdf-51c528de62ce",
  "created" : "2023-10-03T16:14:30.460Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "a167909b-6c05-4265-8e97-ad2d511f8753",
    "status" : "CONNECTING"
  }
}

In Progress (without signatureId)

{
  "id" : "52739eb7-e5da-454a-8315-a6501ad544f7",
  "created" : "2023-10-03T16:14:30.635Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "a167909b-6c05-4265-8e97-ad2d511f8753",
    "status" : "IN_PROGRESS"
  }
}

In Progress (with signatureId)

{
  "id" : "f6b86983-8079-41c8-9c76-46fa38ae333f",
  "created" : "2023-10-03T16:15:08.586Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "a167909b-6c05-4265-8e97-ad2d511f8753",
    "signatureId" : "60d2e500711b4bf2b42f8efe7a8c5cc4",
    "status" : "IN_PROGRESS"
  }
}

Completed

{
  "id" : "5148dbdb-f99b-4e9d-9ebb-3000f4726139",
  "created" : "2023-10-03T16:15:11.247Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "a167909b-6c05-4265-8e97-ad2d511f8753",
    "signatureId" : "60d2e500711b4bf2b42f8efe7a8c5cc4",
    "status" : "COMPLETE"
  }
}
Notice that transaction requests will return a transactionId while signature capture requests return a signatureId.

Example Flow of SmartTerminal Input Capture (non-transaction request)

Connecting

{
  "id" : "aae02117-2c47-49c2-ac75-dc5de0838370",
  "created" : "2023-10-03T16:29:02.783Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "9f7bfe62-42df-4208-8617-990a8510c2f9",
    "status" : "CONNECTING"
  }
}

In Progress (without inputValue)

{
  "id" : "4afe9c94-88f1-41b8-ae06-5b6a73d9be4a",
  "created" : "2023-10-03T16:29:02.998Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "9f7bfe62-42df-4208-8617-990a8510c2f9",
    "status" : "IN_PROGRESS"
  }
}

In Progress (with inputValue)

{
  "id" : "e97636c9-afd9-4492-a9fd-129a2484af4b",
  "created" : "2023-10-03T16:30:02.526Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "9f7bfe62-42df-4208-8617-990a8510c2f9",
    "inputValue" : "8006010230",
    "status" : "IN_PROGRESS"
  }
}

Complete

{
  "id" : "d06429df-6a11-4617-ae9a-c56d45cae7e5",
  "created" : "2023-10-03T16:30:04.937Z",
  "type" : "SMARTTERMINAL_REQUEST",
  "data" : {
    "requestId" : "9f7bfe62-42df-4208-8617-990a8510c2f9",
    "inputValue" : "8006010230",
    "status" : "COMPLETE"
  }
}
Notice that transaction requests will return a transactionId while Input Capture requests return a inputValue.