2. Initiate a transaction

To initiate a POS transaction, you need to use the Order:Create API.

Be sure to check out the API recipe for a simple, step-by-step code example that walks you through the process and helps you get started with this API quickly


2.1 API reference

The Order.Create API reference, including the option to execute real-time requests, can be found at:: https://developer.pay.nl/reference/api_create_order-1


2.2 Authentication

Authentication occurs via Basic Authentication using:

  • Token code (AT-…) as the username and API token (hash of 40 characters) as the password
    or
  • Service ID (SL-…) as the username and the secret as the password.

You can find the Token code and the API token under the "Merchant" -> "Company information" tab in the PAY. Admin Panel.

You can find the Service ID and the secret under the tab "Settings" -> "Sales locations" in the PAY. Admin
Panel. The Service ID is the unique reference of the sales location and starts with SL-… You can find
the corresponding secret by clicking on the data icon of the relevant sales location. The secret, a 40-
character hash, is displayed at the top of the popup.


2.3 Request

A request via the Order:Create API looks something like this:

curl --request POST \
     --url https://connect.pay.nl/v1/orders \
     --header 'accept: application/json' \
     --header 'authorization: Basic QVQtMTIzNC01Njc4OmFiYzEyMw==' \
     --header 'content-type: application/json' \
     --data '
{
  "amount": {
    "value": 150,
    "currency": "EUR"
  },
  "paymentMethod": {
    "input": {
      "terminalCode": "TH-1234-5678"
    },
    "id": 1927
  },
  "serviceId": "SL-1234-5678",
  "reference": "REF1234",
  "exchangeUrl": "https://demo.pay.nl/exchange.php"
}
'

In this example, a 1,50 EUR POS transaction is initiated on terminal TH-1234-5678 via sales location SL-1234-5678. You should use 1927 as the paymentMethod.id. This payment option must be activated in the sales location for which you are initiating the transaction. Then, you specify through the variable paymentMethod.input.terminalCode on which terminal (TH-….) the POS transaction should be initiated


2.4 Response

A response via the Order:Create API looks something like this:

{
  "id": "67f531c2-5114-8d75-136c-2265038314b1",
  "type": "sale",
  "serviceId": "SL-1234-5678",
  "description": null,
  "reference": "REF1234",
  "manualTransferCode": "9000 0510 0785 6048",
  "orderId": "51007856048X14b0",
  "uuid": "ae8c2265-0383-14b0-5100-7856048a14b0",
  "customerKey": null,
  "status": {
    "code": 20,
    "action": "PENDING"
  },
  "receipt": null,
  "integration": {
    "pointOfInteraction": "IN_PERSON",
    "test": false
  },
  "amount": {
    "value": 150,
    "currency": "EUR"
  },
  "checkoutData": null,
  "payments": [
    {
      "id": "67f531c2-5114-8389-203a-051007856049",
      "paymentMethod": {
        "id": 1927,
        "input": {
          "terminalCode": "TH-1234-5678",
          "terminalPin": null
        }
      },
      "customerType": null,
      "customerKey": null,
      "customerId": null,
      "customerName": null,
      "ipAddress": null,
      "secureStatus": false,
      "paymentVerificationMethod": 0,
      "status": {
        "code": 20,
        "action": "PENDING"
      },
      "currencyAmount": {
        "value": 150,
        "currency": "EUR"
      },
      "amount": {
        "value": 150,
        "currency": "EUR"
      },
      "supplierData": null
    }
  ],
  "createdAt": "2025-04-08T16:25:06+02:00",
  "createdBy": "AT-1234-5678",
  "modifiedAt": "2025-04-08T16:25:06+02:00",
  "modifiedBy": null,
  "expiresAt": "2025-05-06T16:25:06+02:00",
  "completedAt": null,
  "links": {
    "status": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/status",
    "abort": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/abort",
    "approve": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/approve",
    "decline": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/decline",
    "void": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/void",
    "capture": "https://connect.pay.nl/v1/orders/67f531c2-5114-8d75-136c-2265038314b1/capture",
    "checkout": "https://checkout.pay.nl/to/payment/67f531c2-5114-8389-203a-051007856049",
    "redirect": "https://checkout.pay.nl/to/payment/67f531c2-5114-8389-203a-051007856049"
  }
}

The response from the Order.Create API contains a large number of variables. The most important ones are listed below:

Variable

Description

id

The unique reference of the entire order

type

Type of transaction that has been initiated:

  • *sale**: POS transaction
  • *credit**: POS refund transaction

payments.id

The unique reference of a payment

serviceId

The service ID of the sales location for which the POS transaction was initiated.

reference

A unique reference to the merchant's internal order ID.

amount.value

The amount for which the POS transaction was initiated.

payments.paymentMethod.input.terminalCode

The terminal (TH-...) on which the POS transaction was initiated.

links.status

Endpoint to verify the status of a POS transaction.

links.redirect

Endpoint of a graphical representation of the progress and status of a transaction. This can optionally be displayed on the cash register screen, tablet, etc.


2.5 Recipe

This recipe provides a quick, step-by-step guide to help you easily use the Order.Create API to execute a POS transaction on a terminal.


What’s Next

Start a refund POS transaction on a terminal.