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

GET /invoices?{query-parameters}

Get a list of all invoices.

Search Parameters

name format description
customerEmail Max Length 64 Limits results to Invoices with a customerEmail starting with the specified string
customerFirstName Max Length 64 Limits results to Invoices with a customerFirstName starting with the specified string
customerLastName Max Length 64 Limits results to Invoices with a customerLastName starting with the specified string
invoiceNumber Max Length 64 Limits results to Invoices with an invoiceNumber starting with the specified string
status OPEN | PAID | VOID Limits results to Invoices in the status specified

Paging and Sorting Parameters

name format description
limit Max 50 Limits the number of results per page. See Pagination.
offset Max 2^31 The index at which to start returning results. See Pagination.
order asc | desc Sorts in ascending (asc) or descending (desc) order based on the sort parameter
sort created | completedAt Changes the order in which results are indexed, defaults to created

Example Request

curl https://api.payjunction.com/invoices/?limit=10&order=asc&sort=completedAt&customerEmail=jdoe&status=OPEN \
  -u "login:password" \
  -H "Accept: application/json" \
  -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY"

Example Response

API version 2023-05-16 or above required to receive the surcharge object and fields in transaction response details. See how to use API versions here.

The surcharge fields are present only if the invoice status is PAID.
Click here for more information regarding surcharge.
{
  "next" : "https://api.payjunction.com/invoices?offset=10&limit=10&order=asc&sort=completedAt&customerEmail=jdoe&status=OPEN",
  "results" : [ {
    "amountBase" : "10.00",
    "amountTotal" : "10.00",
    "created" : "2020-11-24T01:19:23Z",
    "customerEmail" : "jdoe@payjunction.com",
    "customerFirstName" : "John",
    "customerIdentifier" : "customer-id",
    "customerLastName" : "Doe",
    "hostedInvoiceUrl": "https://www.payjunction.com/trinity/invoice#/e321790e-c030-4501-aa99-09e35158c1a6",
    "invoiceId" : "e321790e-c030-4501-aa99-09e35158c1a6",
    "invoiceNumber" : "TO-123456",
    "lastModified" : "2020-11-24T01:19:23Z",
    "message" : "Invoice for takeout order #123456",
    "status" : "OPEN",
    "terminalId" : 1
  }, {
    "amountBase": "10.00",
    "amountSurcharge": "0.30",
    "amountTotal": "10.30",
    "surcharge": {
      "percentage": 3.00000,
      "status": "APPLIED"
    },
    "completedAt": "2020-12-06T01:27:43Z",
    "created": "2020-12-06T01:26:37Z",
    "customerEmail": "fcoyle@payjunction.com",
    "customerFirstName": "Fra",
    "customerLastName": "Coyle",
    "hostedInvoiceUrl": "https://www.payjunction.com/trinity/invoice#/ab7d8e8f-db90-4b5a-a11e-201ac802a90d",
    "invoiceId": "ab7d8e8f-db90-4b5a-a11e-201ac802a90d",
    "lastModified": "2020-12-06T01:27:43Z",
    "status": "PAID",
    "terminalId" : 1,
    "transactionId": 10003
  }, {
    "amountBase" : "1.00",
    "amountTotal" : "1.00",
    "surcharge" : {
       "percentage" : 3.00000,
       "status" : "NOT_APPLIED_DEBIT"
    },
    "created" : "2020-11-29T05:11:47Z",
    "customerEmail" : "jdoe@payjunction.com",
    "customerFirstName" : "John",
    "customerIdentifier" : "customer-id",
    "customerLastName" : "Doe",
    "hostedInvoiceUrl": "https://www.payjunction.com/trinity/invoice#/2dcd72bb-94b7-43b7-b40f-642331de0f72",
    "invoiceId" : "2dcd72bb-94b7-43b7-b40f-642331de0f72",
    "invoiceNumber" : "TO-123789",
    "lastModified" : "2020-11-29T05:11:47Z",
    "message" : "Invoice for takeout order #123789",
    "status" : "PAID",
    "terminalId" : 1,
    "transactionId": 10001
  }, {
    ...
  } ]
}